Always use service restart
for startup
By starting MaxScale with `service restart maxscale`, the start() function is idempotent: MaxScale is started from a stopped state.
This commit is contained in:
@ -230,13 +230,6 @@ int Maxscales::restart_maxscale(int m)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Maxscales::start_maxscale(int m)
|
|
||||||
{
|
|
||||||
int res = ssh_node(m, "service maxscale start", true);
|
|
||||||
fflush(stdout);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Maxscales::stop_maxscale(int m)
|
int Maxscales::stop_maxscale(int m)
|
||||||
{
|
{
|
||||||
int res = ssh_node(m, "service maxscale stop", true);
|
int res = ssh_node(m, "service maxscale stop", true);
|
||||||
@ -244,7 +237,6 @@ int Maxscales::stop_maxscale(int m)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Maxscales::execute_maxadmin_command(int m, const char* cmd)
|
int Maxscales::execute_maxadmin_command(int m, const char* cmd)
|
||||||
{
|
{
|
||||||
return ssh_node_f(m, true, "maxadmin %s", cmd);
|
return ssh_node_f(m, true, "maxadmin %s", cmd);
|
||||||
|
@ -250,9 +250,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief start_maxscale Issues 'service maxscale start' command
|
* @brief alias for restart_maxscale
|
||||||
*/
|
*/
|
||||||
int start_maxscale(int m = 0);
|
int start_maxscale(int m = 0)
|
||||||
|
{
|
||||||
|
return restart_maxscale(m);
|
||||||
|
}
|
||||||
int start(int m = 0)
|
int start(int m = 0)
|
||||||
{
|
{
|
||||||
return start_maxscale(m);
|
return start_maxscale(m);
|
||||||
|
Reference in New Issue
Block a user