diff --git a/ndb/test/src/NdbBackup.cpp b/ndb/test/src/NdbBackup.cpp index 46917cbcb13..6cb3db7d0d3 100644 --- a/ndb/test/src/NdbBackup.cpp +++ b/ndb/test/src/NdbBackup.cpp @@ -69,17 +69,24 @@ NdbBackup::getFileSystemPathForNode(int _node_id){ /** * Fetch configuration from management server */ - ConfigRetriever cr; + ConfigRetriever cr(0, NODE_TYPE_API); + ndb_mgm_configuration * p; - ndb_mgm_configuration * p = cr.getConfig(host.c_str(), port, 0, NODE_TYPE_API); - if(p == 0){ - const char * s = cr.getErrorString(); - if(s == 0) - s = "No error given!"; + BaseString tmp; tmp.assfmt("%s:%d", host.c_str(), port); + NdbMgmHandle handle = ndb_mgm_create_handle(); + if(handle == 0 || ndb_mgm_connect(handle, tmp.c_str()) != 0 && + (p = ndb_mgm_get_configuration(handle, 0)) == 0){ - ndbout << "Could not fetch configuration" << endl; - ndbout << s << endl; - return NULL; + const char * s = 0; + if(p == 0 && handle != 0){ + s = ndb_mgm_get_latest_error_msg(handle); + if(s == 0) + s = "No error given!"; + + ndbout << "Could not fetch configuration" << endl; + ndbout << s << endl; + return NULL; + } } /** diff --git a/ndb/test/src/NdbRestarter.cpp b/ndb/test/src/NdbRestarter.cpp index 6d5abccf0e4..4d6d3ddc001 100644 --- a/ndb/test/src/NdbRestarter.cpp +++ b/ndb/test/src/NdbRestarter.cpp @@ -46,21 +46,21 @@ NdbRestarter::NdbRestarter(const char* _addr): return; } - if (lcfg.items == 0){ + if (lcfg.ids.size() == 0){ g_err << "NdbRestarter - No management servers configured in local config file" << endl; return; } - for (int i = 0; itype){ case MgmId_TCP: char buf[255]; - snprintf(buf, 255, "%s:%d", m->data.tcp.remoteHost, m->data.tcp.port); + snprintf(buf, 255, "%s:%d", m->name.c_str(), m->port); addr.assign(buf); - host.assign(m->data.tcp.remoteHost); - port = m->data.tcp.port; + host.assign(m->name.c_str()); + port = m->port; return; break; case MgmId_File: