mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
provided better error printout for mismatch of node types in configuratoin fetch
fixed to that mgmt server actually uses the connectsring ndb/src/common/mgmcommon/ConfigRetriever.cpp: provided better error printout ndb/src/mgmsrv/main.cpp: fixed to that mgmt server actually uses the connectsring
This commit is contained in:
parent
5b20904078
commit
1a9a113201
2 changed files with 11 additions and 4 deletions
|
@ -238,7 +238,8 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
|
||||||
|
|
||||||
char buf[255];
|
char buf[255];
|
||||||
ndb_mgm_configuration_iterator * it;
|
ndb_mgm_configuration_iterator * it;
|
||||||
it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE);
|
it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf,
|
||||||
|
CFG_SECTION_NODE);
|
||||||
|
|
||||||
if(it == 0){
|
if(it == 0){
|
||||||
BaseString::snprintf(buf, 255, "Unable to create config iterator");
|
BaseString::snprintf(buf, 255, "Unable to create config iterator");
|
||||||
|
@ -284,8 +285,14 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_type != m_node_type){
|
if(_type != m_node_type){
|
||||||
BaseString::snprintf(buf, 255, "Supplied node type(%d) and config node type(%d) "
|
const char *type_s, *alias_s, *type_s2, *alias_s2;
|
||||||
" don't match", m_node_type, _type);
|
alias_s= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)m_node_type,
|
||||||
|
&type_s);
|
||||||
|
alias_s2= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)_type,
|
||||||
|
&type_s2);
|
||||||
|
BaseString::snprintf(buf, 255, "This node type %s(%s) and config "
|
||||||
|
"node type %s(%s) don't match for nodeid %d",
|
||||||
|
alias_s, type_s, alias_s2, type_s2, nodeid);
|
||||||
setError(CR_ERROR, buf);
|
setError(CR_ERROR, buf);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,7 @@ int main(int argc, char** argv)
|
||||||
* Read configuration files *
|
* Read configuration files *
|
||||||
****************************/
|
****************************/
|
||||||
LocalConfig local_config;
|
LocalConfig local_config;
|
||||||
if(!local_config.init(0,glob.local_config_filename)){
|
if(!local_config.init(opt_connect_str,glob.local_config_filename)){
|
||||||
local_config.printError();
|
local_config.printError();
|
||||||
goto error_end;
|
goto error_end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue