You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-03 17:13:17 +03:00
MCOL-522 - add installedd version verify
This commit is contained in:
@@ -2917,10 +2917,25 @@ int main(int argc, char *argv[])
|
|||||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls " + installDir + "/bin/post-install' > /tmp/install_check.log";
|
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls " + installDir + "/bin/post-install' > /tmp/install_check.log";
|
||||||
int rtnCode = system(cmd.c_str());
|
int rtnCode = system(cmd.c_str());
|
||||||
if (WEXITSTATUS(rtnCode) != 0) {
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
cout << endl << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
cout << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||||
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
|
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
//check version that is installed
|
||||||
|
cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + password + " " + installDir + "/releasenum > /dev/null 2>&1";
|
||||||
|
rtnCode = system(cmd.c_str());
|
||||||
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
|
cout << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||||
|
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
cmd = "diff " + installDir + "/releasenum releasenum > /dev/null 2>&1";
|
||||||
|
rtnCode = system(cmd.c_str());
|
||||||
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
|
cout << "Error: Local version of MariaDB ColumnStore doesn't match installed version on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||||
|
cout << "Install matching version and re-run postConfigure. Exiting..." << endl << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||||
|
|||||||
@@ -5074,6 +5074,23 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
pthread_mutex_unlock(&THREAD_LOCK);
|
pthread_mutex_unlock(&THREAD_LOCK);
|
||||||
return API_FAILURE;
|
return API_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//check version that is installed
|
||||||
|
cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + password + " " + installDir + "/releasenum > /dev/null 2>&1";
|
||||||
|
rtnCode = system(cmd.c_str());
|
||||||
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
|
log.writeLog(__LINE__, "addModule - ERROR: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName , LOG_TYPE_ERROR);
|
||||||
|
pthread_mutex_unlock(&THREAD_LOCK);
|
||||||
|
return API_FAILURE;
|
||||||
|
}
|
||||||
|
cmd = "diff " + installDir + "/releasenum releasenum > /dev/null 2>&1";
|
||||||
|
rtnCode = system(cmd.c_str());
|
||||||
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
|
log.writeLog(__LINE__, "addModule - ERROR: Local version of MariaDB ColumnStore doesn't match installed version on " + remoteModuleName + " / " + remoteHostName , LOG_TYPE_ERROR);
|
||||||
|
pthread_mutex_unlock(&THREAD_LOCK);
|
||||||
|
return API_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//run installer on remote module
|
//run installer on remote module
|
||||||
|
|||||||
Reference in New Issue
Block a user