Commit 1e853569 authored by unknown's avatar unknown

wl1292 - workaround for mgmsrv node id problems


ndb/src/cw/cpcd/Makefile.am:
  Put cpcd in libexec
ndb/src/cw/cpcd/Process.cpp:
  Fixed reverse check with ulimit
ndb/test/run-test/main.cpp:
  Restart mgm server aswell on test failure.
  Removes problems with nodeid
parent 1af1e3d2
ndbtools_PROGRAMS = ndb_cpcd ndbbin_PROGRAMS = ndb_cpcd
ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
......
...@@ -209,11 +209,12 @@ int ...@@ -209,11 +209,12 @@ int
set_ulimit(const BaseString & pair){ set_ulimit(const BaseString & pair){
#ifdef HAVE_GETRLIMIT #ifdef HAVE_GETRLIMIT
errno = 0; errno = 0;
do {
Vector<BaseString> list; Vector<BaseString> list;
pair.split(list, ":"); pair.split(list, ":");
if(list.size() != 2){ if(list.size() != 2){
break; logger.error("Unable to process ulimit: split >%s< list.size()=%d",
pair.c_str(), list.size());
return -1;
} }
int res; int res;
...@@ -239,19 +240,14 @@ set_ulimit(const BaseString & pair){ ...@@ -239,19 +240,14 @@ set_ulimit(const BaseString & pair){
_RLIMIT_FIX(RLIMIT_CPU); _RLIMIT_FIX(RLIMIT_CPU);
} else { } else {
errno = EINVAL; errno = EINVAL;
break;
} }
if(!res) if(res){
break; logger.error("Unable to process ulimit: %s res=%d error=%d(%s)",
pair.c_str(), res, errno, strerror(errno));
return 0;
} while(false);
logger.error("Unable to process ulimit: %s(%s)",
pair.c_str(), strerror(errno));
return -1; return -1;
#else }
return 0; // Maybe it's ok anyway...
#endif #endif
return 0;
} }
void void
......
...@@ -106,13 +106,6 @@ main(int argc, const char ** argv){ ...@@ -106,13 +106,6 @@ main(int argc, const char ** argv){
if(!setup_hosts(g_config)) if(!setup_hosts(g_config))
goto end; goto end;
if(!start_processes(g_config, atrt_process::NDB_MGM))
goto end;
if(!connect_ndb_mgm(g_config)){
goto end;
}
/** /**
* Main loop * Main loop
*/ */
...@@ -122,12 +115,19 @@ main(int argc, const char ** argv){ ...@@ -122,12 +115,19 @@ main(int argc, const char ** argv){
*/ */
if(restart){ if(restart){
g_logger.info("(Re)starting ndb processes"); g_logger.info("(Re)starting ndb processes");
if(!stop_processes(g_config, atrt_process::NDB_MGM))
goto end;
if(!stop_processes(g_config, atrt_process::NDB_DB)) if(!stop_processes(g_config, atrt_process::NDB_DB))
goto end; goto end;
if(!wait_ndb(g_config, NDB_MGM_NODE_STATUS_NO_CONTACT)) if(!start_processes(g_config, atrt_process::NDB_MGM))
goto end; goto end;
if(!connect_ndb_mgm(g_config)){
goto end;
}
if(!start_processes(g_config, atrt_process::NDB_DB)) if(!start_processes(g_config, atrt_process::NDB_DB))
goto end; goto end;
...@@ -140,7 +140,7 @@ main(int argc, const char ** argv){ ...@@ -140,7 +140,7 @@ main(int argc, const char ** argv){
goto end; goto end;
started: started:
g_logger.info("Ndb start completed"); g_logger.info("Ndb start completed");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment