From 8f2bfb58de1d201b18d3d3f24a749ef67ee9e369 Mon Sep 17 00:00:00 2001 From: david hill Date: Thu, 19 Jan 2017 15:16:17 -0600 Subject: [PATCH] MCOL-481 fix --- oamapps/postConfigure/postConfigure.cpp | 47 ++++++++++--------------- procmgr/processmanager.cpp | 22 ++---------- 2 files changed, 21 insertions(+), 48 deletions(-) diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index f8e66311a..1679a07d1 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -703,37 +703,26 @@ int main(int argc, char *argv[]) exit(1); } - if ( mysqlRep ) - { // current enabled - if ( answer == "y" ) { - mysqlRep = true; - MySQLRep = "y"; - } - else - { - mysqlRep = false; - MySQLRep = "n"; - } - } - else - { // currently disabled - if ( answer == "y" ) { - mysqlRep = false; - MySQLRep = "n"; - } - else - { - mysqlRep = true; - MySQLRep = "y"; - } - } + if ( answer == "y" ) { + mysqlRep = true; + MySQLRep = "y"; + } + else + { + mysqlRep = false; + MySQLRep = "n"; + } - try { - sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep); - } - catch(...) - {} + try { + sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep); + } + catch(...) + {} + if ( !writeConfig(sysConfig) ) { + cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; + exit(1); + } switch ( IserverTypeInstall ) { case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm on a single server diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index c5efc3c31..8dedf915d 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -10054,15 +10054,7 @@ int ProcessManager::setMySQLReplication(oam::DeviceNetworkList devicenetworklist try { Config* sysConfig = Config::makeConfig(); if ( sysConfig->getConfig("DBRM_Controller", "NumWorkers") == "1" ) { - //disable mysqlrep - log.writeLog(__LINE__, "Disable MySQL Replication", LOG_TYPE_DEBUG); - try { - oam.setSystemConfig("MySQLRep", "n"); - } - catch(...) {} - - enable = false; - distributeDB = true; + return oam::API_SUCCESS; } } catch(...) @@ -10080,17 +10072,9 @@ int ProcessManager::setMySQLReplication(oam::DeviceNetworkList devicenetworklist catch(...) {} - if ( moduletypeconfig.ModuleCount < 1 ) + if ( moduletypeconfig.ModuleCount < 2 ) { - //disable mysqlrep - log.writeLog(__LINE__, "Disable MySQL Replication", LOG_TYPE_DEBUG); - try { - oam.setSystemConfig("MySQLRep", "n"); - } - catch(...) {} - - enable = false; - distributeDB = true; + return oam::API_SUCCESS; } }