MXS-2219 Dynamically create Clustrix servers
MaxScale server objects are now created for all Clustrix nodes. Currently the name is "Clustrix-Server-N" where N is the number of the node. The server is created using runtime_create_server() that has been modified so that it optionally will not persist the created server. That is probably just a temporary solution as a monitor should not need to include .../core/internal-stuff.
This commit is contained in:
@ -209,7 +209,8 @@ bool runtime_create_server(const char* name,
|
||||
const char* address,
|
||||
const char* port,
|
||||
const char* protocol,
|
||||
const char* authenticator)
|
||||
const char* authenticator,
|
||||
bool serialize)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(crt_lock);
|
||||
bool rval = false;
|
||||
@ -244,7 +245,7 @@ bool runtime_create_server(const char* name,
|
||||
|
||||
Server* server = Server::server_alloc(name, ctx.parameters);
|
||||
|
||||
if (server && server->serialize())
|
||||
if (server && (!serialize || server->serialize()))
|
||||
{
|
||||
rval = true;
|
||||
MXS_NOTICE("Created server '%s' at %s:%u",
|
||||
|
||||
Reference in New Issue
Block a user