From 166193471fdeff501883ed882ce44d16ddaff384 Mon Sep 17 00:00:00 2001 From: david hill Date: Mon, 19 Jun 2017 10:40:35 -0500 Subject: [PATCH] move down some of the config variables --- procmon/main.cpp | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/procmon/main.cpp b/procmon/main.cpp index 0f7901938..ff3db765f 100644 --- a/procmon/main.cpp +++ b/procmon/main.cpp @@ -130,53 +130,6 @@ int main(int argc, char **argv) setlocale(LC_ALL, systemLang.c_str()); - // if amazon cloud, check and update Instance IP Addresses and volumes - try { - oam.getSystemConfig( "Cloud", cloud); - } - catch(...) {} - - if ( cloud == "amazon-ec2" ) { - if(!aMonitor.amazonIPCheck()) { - log.writeLog(__LINE__, "ERROR: amazonIPCheck failed, exiting", LOG_TYPE_CRITICAL); - sleep(2); - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1"; - system(cmd.c_str()); - exit(1); - } - } - - //get gluster config - try { - oam.getSystemConfig( "GlusterConfig", GlusterConfig); - } - catch(...) - { - GlusterConfig = "n"; - } - - if ( GlusterConfig == "y" ) { - system("mount -a > /dev/null 2>&1"); - } - - //hdfs / hadoop config - string DBRootStorageType; - try { - oam.getSystemConfig( "DBRootStorageType", DBRootStorageType); - } - catch(...) {} - - if ( DBRootStorageType == "hdfs" ) - HDFS = true; - - //PMwithUM config - try { - oam.getSystemConfig( "PMwithUM", PMwithUM); - } - catch(...) { - PMwithUM = "n"; - } - //define entry if missing Config* sysConfig = Config::makeConfig(); if ( gOAMParentModuleFlag ) @@ -333,7 +286,7 @@ int main(int argc, char **argv) { bool fresh = false; - // not active Parent, get updated Columnstore.xml, retry in case ProcMgr isn't up yet + // not active Parent, get updated Columnstore.xml, retry in case ProcMgr isn't up yet if (!HDFS) { //check if this is a fresh install, meaning the Columnstore.xml file is not setup @@ -416,6 +369,53 @@ int main(int argc, char **argv) exit (1); } + // if amazon cloud, check and update Instance IP Addresses and volumes + try { + oam.getSystemConfig( "Cloud", cloud); + } + catch(...) {} + + if ( cloud == "amazon-ec2" ) { + if(!aMonitor.amazonIPCheck()) { + log.writeLog(__LINE__, "ERROR: amazonIPCheck failed, exiting", LOG_TYPE_CRITICAL); + sleep(2); + string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1"; + system(cmd.c_str()); + exit(1); + } + } + + //get gluster config + try { + oam.getSystemConfig( "GlusterConfig", GlusterConfig); + } + catch(...) + { + GlusterConfig = "n"; + } + + if ( GlusterConfig == "y" ) { + system("mount -a > /dev/null 2>&1"); + } + + //hdfs / hadoop config + string DBRootStorageType; + try { + oam.getSystemConfig( "DBRootStorageType", DBRootStorageType); + } + catch(...) {} + + if ( DBRootStorageType == "hdfs" ) + HDFS = true; + + //PMwithUM config + try { + oam.getSystemConfig( "PMwithUM", PMwithUM); + } + catch(...) { + PMwithUM = "n"; + } + //check if module is in a DISABLED state bool DISABLED = false; if ( moduleStatus == oam::MAN_DISABLED ||