mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
90b102daa6
BUG#12037 ndb_mgmd IP address do not show in other ndb_mgmd processes Extend ApiVersionConf to include address. ndb/include/kernel/signaldata/ApiVersion.hpp: Extend ApiVersionConf to include inet_addr. the address used for communication to this node. ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: include connect address in ApiVersionConf ndb/src/mgmsrv/MgmtSrvr.cpp: ::status() now also returns char* address of the node. For API or MGM, this is in ApiVersionConf. For NDB, this is the standard get_connect_address. When sending ApiVersionReq, try to send to a STARTED node (as these have properly joined the cluster and know the connect addresses). If versionNode is called for getOwnNodeId()==nodeId, try to get the address via ApiVersionConf. If that fails, look it up in the configuration. ndb/src/mgmsrv/MgmtSrvr.hpp: Add char **address to prototypes. ndb/src/mgmsrv/Services.cpp: Get the connect address from mgmsrv.status()
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
/* Copyright (C) 2003 MySQL AB
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
#ifndef API_VERSION_HPP
|
|
#define API_VERSION_HPP
|
|
|
|
class ApiVersionReq {
|
|
/**
|
|
* Sender(s)
|
|
*/
|
|
friend class MgmtSrv;
|
|
|
|
/**
|
|
* Reciver(s)
|
|
*/
|
|
friend class Qmgr;
|
|
public:
|
|
STATIC_CONST( SignalLength = 3 );
|
|
Uint32 senderRef;
|
|
Uint32 nodeId; //api node id
|
|
Uint32 version; // Version of API node
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class ApiVersionConf {
|
|
/**
|
|
* Sender(s)
|
|
*/
|
|
friend class Qmgr;
|
|
|
|
/**
|
|
* Reciver(s)
|
|
*/
|
|
friend class MgmtSrv;
|
|
public:
|
|
STATIC_CONST( SignalLength = 4 );
|
|
Uint32 senderRef;
|
|
Uint32 nodeId; //api node id
|
|
Uint32 version; // Version of API node
|
|
Uint32 inet_addr;
|
|
};
|
|
|
|
#endif
|