From fca09e0d7b4a4a8f859c3830f11659cb8eafaf8d Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 6 Sep 2016 15:05:34 +0300 Subject: [PATCH] MXS-836: Fix retry_on_failure not working The service start retry mechanism mistakenly returned an error when a service failed to start but a retry was queued. This caused MaxScale to stop whenever a service failed to start. --- server/core/config.c | 1 + server/core/service.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/server/core/config.c b/server/core/config.c index 2559fec02..2ca6dcdab 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -135,6 +135,7 @@ static char *service_params[] = "ignore_databases_regex", "log_auth_warnings", "source", /**< Avrorouter only */ + "retry_on_failure", NULL }; diff --git a/server/core/service.c b/server/core/service.c index ddb9ec99b..1aa106eb3 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -452,6 +452,9 @@ int serviceStartAllPorts(SERVICE* service) (void*) service, retry_after); MXS_NOTICE("Failed to start service %s, retrying in %d seconds.", service->name, retry_after); + + /** This will prevent MaxScale from shutting down if service start is retried later */ + listeners = 1; } } else