1
0
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:
david hill
2017-05-24 14:25:53 -05:00
parent 02f9aa1260
commit 16f22c2c70
2 changed files with 33 additions and 1 deletions

View File

@@ -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";
int rtnCode = system(cmd.c_str());
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;
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
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;