1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-938 - fixed server-id setup on combo systems

This commit is contained in:
david hill
2017-10-30 13:42:31 -05:00
parent 8a1d1f7aa8
commit 6277371669
4 changed files with 54 additions and 36 deletions

View File

@@ -30,7 +30,7 @@ set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infi
# #
# run command # run command
# #
set timeout 60 set timeout 20
send "$COMMAND\n" send "$COMMAND\n"
expect { expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1} -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1}
@@ -57,25 +57,27 @@ expect {
set HOME "$env(HOME)" set HOME "$env(HOME)"
set COMMAND "rsync -vopgr -e ssh $HOME/.my.cnf $USERNAME@$SERVER:$HOME/" if {[file exist $HOME/.my.cnf]} {
# set COMMAND "rsync -vopgr -e ssh $HOME/.my.cnf $USERNAME@$SERVER:$HOME/"
# run command
# #
set timeout 20 # run command
send "$COMMAND\n" #
expect { set timeout 10
send "$COMMAND\n"
expect {
-re "word: " { send "$PASSWORD\n" } -re "word: " { send "$PASSWORD\n" }
-re "passphrase" { send "$PASSWORD\n" } -re "passphrase" { send "$PASSWORD\n" }
-re "total size" {} abort -re "total size" {} abort
-re "failed" { exit 0 } -re "failed" { exit 0 }
timeout { exit 0 } timeout { exit 0 }
} }
expect { expect {
-re "total size" {} abort -re "total size" {} abort
-re "failed" { exit 0 } -re "failed" { exit 0 }
timeout { exit 0 } timeout { exit 0 }
}
} }
exit 0 exit 0

View File

@@ -459,7 +459,9 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
{ // set for slave repl request { // set for slave repl request
// don't do PMs unless PMwithUM flag is set // don't do PMs unless PMwithUM flag is set
string moduleType = (*pt).DeviceName.substr(0,MAX_MODULE_TYPE_SIZE); string moduleType = (*pt).DeviceName.substr(0,MAX_MODULE_TYPE_SIZE);
if ( moduleType == "pm" && !pmwithum ) {
if ( ( moduleType == "pm" && !pmwithum ) &&
( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ) ) {
pt++; pt++;
continue; continue;
} }
@@ -678,15 +680,19 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig )
if ( size != 0 ) { if ( size != 0 ) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "Either use the command line argument of 'port' to enter a different number" << endl;
cout << "or stop the process that is using port '" + mysqlPort + "'" << endl;
cout << "For No-prompt install, exiting" << endl;
exit(1); exit(1);
} }
cout << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on local server" << endl; cout << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on local server" << endl;
cout << "Either enter a different port to use" << endl;
cout << "or stop the process that is using port '" + mysqlPort + "' and enter '" + mysqlPort + "' to continue" << endl;
while(true) while(true)
{ {
prompt = "Enter a different port number > "; prompt = "Enter port number > ";
pcommand = callReadline(prompt.c_str()); pcommand = callReadline(prompt.c_str());
if (pcommand) if (pcommand)
{ {
@@ -756,7 +762,9 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
if ( size != 0 ) { if ( size != 0 ) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "Either use the command line argument of 'port' to enter a different number" << endl;
cout << "or stop the process that is using port '" + mysqlPort + "'" << endl;
cout << "For No-prompt install, exiting" << endl;
exit(1); exit(1);
} }
else else
@@ -787,7 +795,9 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
if (WEXITSTATUS(rtnCode) == 0) { if (WEXITSTATUS(rtnCode) == 0) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << remoteModuleName << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << remoteModuleName << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "Either use the command line argument of 'port' to enter a different number" << endl;
cout << "or stop the process that is using port '" + mysqlPort + "'" << endl;
cout << "For No-prompt install, exiting" << endl;
cout << "exiting..." << endl; cout << "exiting..." << endl;
exit(1); exit(1);
} }
@@ -805,10 +815,12 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
if ( inUse ) if ( inUse )
{ {
cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << inUseServer << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << inUseServer << endl;
cout << "Either enter a different port to use" << endl;
cout << "or stop the process that is using port '" + mysqlPort + "' and enter '" + mysqlPort + "' to continue" << endl;
while(true) while(true)
{ {
prompt = "Enter a different port number > "; prompt = "Enter a port number > ";
pcommand = callReadline(prompt.c_str()); pcommand = callReadline(prompt.c_str());
if (pcommand) if (pcommand)
{ {

View File

@@ -5440,12 +5440,11 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
} }
//delay to give time for ProcMon to start after the config is sent and procmon restarts //delay to give time for ProcMon to start after the config is sent and procmon restarts
log.writeLog(__LINE__, "addModule - sleep 10 - give ProcMon time to CONFIGURE and restart", LOG_TYPE_DEBUG); log.writeLog(__LINE__, "addModule - sleep 30 - give ProcMon time to CONFIGURE and restart", LOG_TYPE_DEBUG);
sleep(10); sleep(30);
// sleep(5); log.writeLog(__LINE__, "Setup MySQL Replication for new Modules being Added", LOG_TYPE_DEBUG);
// log.writeLog(__LINE__, "Setup MySQL Replication for new Modules being Added", LOG_TYPE_DEBUG); processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, true, password );
// processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, true, password );
return API_SUCCESS; return API_SUCCESS;
} }

View File

@@ -1791,7 +1791,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
string masterLogFile = oam::UnassignedName; string masterLogFile = oam::UnassignedName;
string masterLogPos = oam::UnassignedName; string masterLogPos = oam::UnassignedName;
if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) &&
( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) )
{ {
ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) ACK;
ackMsg << (ByteStream::byte) MASTERREP; ackMsg << (ByteStream::byte) MASTERREP;
@@ -1864,7 +1865,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
string port; string port;
msg >> port; msg >> port;
if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) &&
( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) )
{ {
ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) ACK;
ackMsg << (ByteStream::byte) SLAVEREP; ackMsg << (ByteStream::byte) SLAVEREP;
@@ -1911,7 +1913,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
string module; string module;
msg >> module; msg >> module;
if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) &&
( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) )
{ {
ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) ACK;
ackMsg << (ByteStream::byte) MASTERDIST; ackMsg << (ByteStream::byte) MASTERDIST;
@@ -5008,7 +5011,8 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType; string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType;
if ( (PMwithUM == "n") && (moduleType == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) &&
( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) )
continue; continue;
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
@@ -5304,7 +5308,8 @@ int ProcessMonitor::runMasterDist(std::string& password, std::string& slaveModul
string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType; string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType;
if ( (PMwithUM == "n") && (moduleType == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) &&
( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) )
continue; continue;
DeviceNetworkList::iterator pt = systemModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.begin(); DeviceNetworkList::iterator pt = systemModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.begin();