From a53dbeec5789a22bfb32b9187417bfd5e8530358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 5 Nov 2018 14:00:57 +0200 Subject: [PATCH] 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. --- maxscale-system-test/maxscales.cpp | 8 -------- maxscale-system-test/maxscales.h | 7 +++++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/maxscale-system-test/maxscales.cpp b/maxscale-system-test/maxscales.cpp index 61bcad2f9..9b41b47a4 100644 --- a/maxscale-system-test/maxscales.cpp +++ b/maxscale-system-test/maxscales.cpp @@ -230,13 +230,6 @@ int Maxscales::restart_maxscale(int m) 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 res = ssh_node(m, "service maxscale stop", true); @@ -244,7 +237,6 @@ int Maxscales::stop_maxscale(int m) return res; } - int Maxscales::execute_maxadmin_command(int m, const char* cmd) { return ssh_node_f(m, true, "maxadmin %s", cmd); diff --git a/maxscale-system-test/maxscales.h b/maxscale-system-test/maxscales.h index 1efe986f5..0df0a82bd 100644 --- a/maxscale-system-test/maxscales.h +++ b/maxscale-system-test/maxscales.h @@ -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) { return start_maxscale(m);