diff --git a/dbcon/mysql/ha_mcs_client_udfs.cpp b/dbcon/mysql/ha_mcs_client_udfs.cpp index 8395b364b..aa9d114eb 100644 --- a/dbcon/mysql/ha_mcs_client_udfs.cpp +++ b/dbcon/mysql/ha_mcs_client_udfs.cpp @@ -294,24 +294,10 @@ extern "C" try { - if (getenv("SKIP_OAM_INIT")) + if (dbrm.getSystemReady() + && dbrm.getSystemQueryReady()) { - if (dbrm.getSystemReady() - && dbrm.getSystemQueryReady()) - { - return 1; - } - } - else - { - oam.getSystemStatus(systemstatus); - - if (systemstatus.SystemOpState == ACTIVE - && dbrm.getSystemReady() - && dbrm.getSystemQueryReady()) - { - return 1; - } + return 1; } } catch (...) diff --git a/exemgr/main.cpp b/exemgr/main.cpp index 3fa3a1c79..bfc505409 100644 --- a/exemgr/main.cpp +++ b/exemgr/main.cpp @@ -1643,7 +1643,7 @@ int main(int argc, char* argv[]) { } } - if (getenv("SKIP_OAM_INIT")) + { BRM::DBRM *dbrm = new BRM::DBRM(); dbrm->setSystemQueryReady(true); diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index 8b3454f33..98655210b 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -2371,9 +2371,9 @@ void Oam::setProcessStatus(const std::string process, const std::string module, void Oam::processInitComplete(std::string processName, int state) { -//This method takes too long on Windows and doesn't do anything there anyway... - if (getenv("SKIP_OAM_INIT") != NULL) - return; + //This method takes too long on Windows and doesn't do anything there anyway... + // Disable legacy OAM + return; // get current Module name string moduleName; oamModuleInfo_t st; diff --git a/oam/oamcpp/oamcache.cpp b/oam/oamcpp/oamcache.cpp index aae381b18..efb41ba5b 100644 --- a/oam/oamcpp/oamcache.cpp +++ b/oam/oamcpp/oamcache.cpp @@ -111,6 +111,8 @@ void OamCache::checkReload() // Restore for Windows when we support multiple PMs while (it != uniquePids.end()) { + // Disable legacy-OAM. +/* if (getenv("SKIP_OAM_INIT") == NULL) { try @@ -182,6 +184,7 @@ void OamCache::checkReload() } } else +*/ { pmToConnectionMap[*it] = i++; moduleIds.push_back(*it); diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index c2a13ab0f..fa2a3ff22 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -174,10 +174,8 @@ void setupSignalHandlers() int main(int argc, char* argv[]) { - // print a warning if this is a developer build - if (getenv("SKIP_OAM_INIT")) { - cout << "SKIP_OAM_INIT is set" << endl; + cout << "SKIP_OAM_INIT is set and legacy OAM is disabled by default" << endl; sleep(2); } diff --git a/writeengine/redistribute/we_redistributecontrolthread.cpp b/writeengine/redistribute/we_redistributecontrolthread.cpp index f67bf9430..93d4721bf 100644 --- a/writeengine/redistribute/we_redistributecontrolthread.cpp +++ b/writeengine/redistribute/we_redistributecontrolthread.cpp @@ -617,7 +617,8 @@ int RedistributeControlThread::executeRedistributePlan() { try { -// skip system status check in case no OAM + // skip system status check in case no OAM +/* if (getenv("SKIP_OAM_INIT") == NULL) { // make sure system is in active state @@ -646,6 +647,7 @@ int RedistributeControlThread::executeRedistributePlan() sleep(1);; } } +*/ if (fStopAction) return RED_EC_USER_STOP; diff --git a/writeengine/splitter/we_sdhandler.cpp b/writeengine/splitter/we_sdhandler.cpp index a819dbda2..5a830beed 100644 --- a/writeengine/splitter/we_sdhandler.cpp +++ b/writeengine/splitter/we_sdhandler.cpp @@ -542,7 +542,7 @@ void WESDHandler::setup() } // getModuleStatus will take too long. Also to test in development - if (getenv("SKIP_OAM_INIT") == NULL) +/* if (getenv("SKIP_OAM_INIT") == NULL) { vector& aVec = fRef.fCmdArgs.getPmVec(); @@ -573,6 +573,7 @@ void WESDHandler::setup() } } } +*/ int rtn = fDbrm.getSystemReady();