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 
			
		
		
		
	Add new command line option '-m' to postConfigure. Makes packages management by postConfigure optional
This commit is contained in:
		@@ -172,6 +172,7 @@ bool amazonInstall = false;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
string DataFileEnvFile;
 | 
					string DataFileEnvFile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					string managePackages;
 | 
				
			||||||
string installDir;
 | 
					string installDir;
 | 
				
			||||||
string HOME = "/root";
 | 
					string HOME = "/root";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -210,6 +211,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
	// -o to prompt for process to start offline
 | 
						// -o to prompt for process to start offline
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//default
 | 
						//default
 | 
				
			||||||
 | 
						managePackages = "0";
 | 
				
			||||||
	installDir = installDir + "";
 | 
						installDir = installDir + "";
 | 
				
			||||||
	//see if we can determine our own location
 | 
						//see if we can determine our own location
 | 
				
			||||||
	ostringstream oss;
 | 
						ostringstream oss;
 | 
				
			||||||
@@ -279,6 +281,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
			cout << "   -s  Single Threaded Remote Install" << endl;
 | 
								cout << "   -s  Single Threaded Remote Install" << endl;
 | 
				
			||||||
			cout << "   -port MariaDB ColumnStore Port Address" << endl;
 | 
								cout << "   -port MariaDB ColumnStore Port Address" << endl;
 | 
				
			||||||
            cout << "   -i Non-root Install directory, Only use for non-root installs" << endl;
 | 
					            cout << "   -i Non-root Install directory, Only use for non-root installs" << endl;
 | 
				
			||||||
 | 
								cout << "   -m When specified, postConfigure won't try to deploy, install or uninstall packages" << endl;
 | 
				
			||||||
			exit (0);
 | 
								exit (0);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
      		else if( string("-s") == argv[i] )
 | 
					      		else if( string("-s") == argv[i] )
 | 
				
			||||||
@@ -336,11 +339,14 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
                exit (1);
 | 
					                exit (1);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            installDir = argv[i];
 | 
					            installDir = argv[i];
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
							else if( string("-m") == argv[i] ) {
 | 
				
			||||||
 | 
								managePackages = "0";
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			cout << "   ERROR: Invalid Argument = " << argv[i] << endl;
 | 
								cout << "   ERROR: Invalid Argument = " << argv[i] << endl;
 | 
				
			||||||
   			cout << "   Usage: postConfigure [-h][-c][-u][-p][-s][-port][-i]" << endl;
 | 
					   			cout << "   Usage: postConfigure [-h][-c][-m][-u][-p][-s][-port][-i]" << endl;
 | 
				
			||||||
			exit (1);
 | 
								exit (1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -2670,6 +2676,9 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
			else	//nonroot, default to binary
 | 
								else	//nonroot, default to binary
 | 
				
			||||||
				EEPackageType = "binary";
 | 
									EEPackageType = "binary";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								string version = systemsoftware.Version + "-" + systemsoftware.Release;
 | 
				
			||||||
 | 
								if ( managePackages == "1")
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
				while(true) {
 | 
									while(true) {
 | 
				
			||||||
					prompt = "Enter the Package Type being installed to other servers [rpm,deb,binary] (" + EEPackageType + ") > ";
 | 
										prompt = "Enter the Package Type being installed to other servers [rpm,deb,binary] (" + EEPackageType + ") > ";
 | 
				
			||||||
					pcommand = callReadline(prompt);
 | 
										pcommand = callReadline(prompt);
 | 
				
			||||||
@@ -2722,7 +2731,6 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				//check if pkgs are located in $HOME directory
 | 
									//check if pkgs are located in $HOME directory
 | 
				
			||||||
			string version = systemsoftware.Version + "-" + systemsoftware.Release;
 | 
					 | 
				
			||||||
				if ( EEPackageType != "binary") {
 | 
									if ( EEPackageType != "binary") {
 | 
				
			||||||
					string separator = "-";
 | 
										string separator = "-";
 | 
				
			||||||
					calpontPackage1 = "mariadb-columnstore-*" + separator + version;
 | 
										calpontPackage1 = "mariadb-columnstore-*" + separator + version;
 | 
				
			||||||
@@ -2775,6 +2783,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
				//		calpontPackage3 = "dummy.rpm";
 | 
									//		calpontPackage3 = "dummy.rpm";
 | 
				
			||||||
				//	globfree(>);
 | 
									//	globfree(>);
 | 
				
			||||||
				//}
 | 
									//}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if ( password.empty() )
 | 
								if ( password.empty() )
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -2874,7 +2883,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
							temppwprompt = "none";
 | 
												temppwprompt = "none";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						//run remote installer script
 | 
											//run remote installer script
 | 
				
			||||||
						cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + temppwprompt + " " + mysqlPort + " " + remote_installer_debug + " " + debug_logfile;
 | 
											cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + temppwprompt + " " + mysqlPort + " " + remote_installer_debug + " " + debug_logfile + " " + managePackages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//cout << cmd << endl;
 | 
					//cout << cmd << endl;
 | 
				
			||||||
						if ( thread_remote_installer ) {
 | 
											if ( thread_remote_installer ) {
 | 
				
			||||||
@@ -2987,7 +2996,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
						cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " +
 | 
											cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " +
 | 
				
			||||||
							remoteModuleIP + " " + password + " " + calpontPackage1 + " " + remoteModuleType +
 | 
												remoteModuleIP + " " + password + " " + calpontPackage1 + " " + remoteModuleType +
 | 
				
			||||||
							" initial " + binservertype + " " + mysqlPort + " " + remote_installer_debug +
 | 
												" initial " + binservertype + " " + mysqlPort + " " + remote_installer_debug +
 | 
				
			||||||
							" " + installDir + " " + debug_logfile;
 | 
												" " + installDir + " " + debug_logfile + " " + managePackages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						if ( thread_remote_installer ) {
 | 
											if ( thread_remote_installer ) {
 | 
				
			||||||
							thr_data[thread_id].command = cmd;
 | 
												thr_data[thread_id].command = cmd;
 | 
				
			||||||
@@ -3024,7 +3033,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
						if ( EEPackageType != "binary" ) {
 | 
											if ( EEPackageType != "binary" ) {
 | 
				
			||||||
							//run remote installer script
 | 
												//run remote installer script
 | 
				
			||||||
							cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
 | 
												cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile + " " + managePackages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//cout << cmd << endl;
 | 
					//cout << cmd << endl;
 | 
				
			||||||
							if ( thread_remote_installer ) {
 | 
												if ( thread_remote_installer ) {
 | 
				
			||||||
@@ -3057,7 +3066,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
							cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
 | 
												cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
 | 
				
			||||||
								" " + password + " " + calpontPackage1 + " " + remoteModuleType + " initial " +
 | 
													" " + password + " " + calpontPackage1 + " " + remoteModuleType + " initial " +
 | 
				
			||||||
								binservertype + " " + mysqlPort + " " + remote_installer_debug + " " + installDir + " " +
 | 
													binservertype + " " + mysqlPort + " " + remote_installer_debug + " " + installDir + " " +
 | 
				
			||||||
								debug_logfile;
 | 
													debug_logfile + " " + managePackages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							if ( thread_remote_installer ) {
 | 
												if ( thread_remote_installer ) {
 | 
				
			||||||
								thr_data[thread_id].command = cmd;
 | 
													thr_data[thread_id].command = cmd;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user