From: Date: September 16 2005 9:43am Subject: bk commit into 4.1 tree (stewart:1.2436) BUG#11595 List-Archive: http://lists.mysql.com/internals/29975 X-Bug: 11595 Message-Id: <20050916074304.3FB6A1431B18@localhost.localdomain> Below is the list of changes that have just been committed into a local 4.1 repository of stewart. When stewart does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2436 05/09/16 17:43:00 stewart@stripped +1 -0 BUG#11595 ndb_mgm shows from IP for second mgmd While unable to reproduce the wrong IP address, I was able to reproduce the "no ip address listed" when connecting to secondary mgm servers. If you have more than one mgm server, this will display the IP addresses for each mgm server on all mgm servers. ndb/src/mgmsrv/MgmtSrvr.cpp 1.67 05/09/16 17:42:57 stewart@stripped +19 -0 in get_connect_address: if node_id is a management server (and we don't have a m_connect_address), get the address from the configuration. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: stewart # Host: willster.(none) # Root: /home/stewart/Documents/MySQL/4.1/bug11595 --- 1.66/ndb/src/mgmsrv/MgmtSrvr.cpp 2005-09-13 01:00:46 +10:00 +++ 1.67/ndb/src/mgmsrv/MgmtSrvr.cpp 2005-09-16 17:42:57 +10:00 @@ -2091,6 +2091,25 @@ theFacade->theTransporterRegistry->get_connect_address(node_id); } } + if(m_connect_address[node_id].s_addr == 0 && + getNodeType(node_id) == NDB_MGM_NODE_TYPE_MGM) + { + ndb_mgm_configuration_iterator + iter(* _config->m_configValues, CFG_SECTION_NODE); + for(iter.first(); iter.valid(); iter.next()) { + unsigned tmp= 0; + if(iter.get(CFG_NODE_ID, &tmp)) require(false); + if (node_id != tmp) + continue; + unsigned type_c; + if(iter.get(CFG_TYPE_OF_SECTION, &type_c)) require(false); + if(type_c != NDB_MGM_NODE_TYPE_MGM) + continue; + const char* config_hostname; + if(iter.get(CFG_NODE_HOST, &config_hostname)) require(false); + return config_hostname; + } + } return inet_ntoa(m_connect_address[node_id]); }