From a85189fd8f8b6e2719ab0040e0cefae4202143eb Mon Sep 17 00:00:00 2001 From: vincent Date: Fri, 22 Feb 2019 14:02:50 +0100 Subject: [PATCH] =?UTF-8?q?Conditionnement=20sur=20le=20mode=20HA=20et=20L?= =?UTF-8?q?eader=20pour=20l'ex=C3=A9cution=20de=20l'init=5Fha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postservice/30-one-mng | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/postservice/30-one-mng b/postservice/30-one-mng index 635f170..3344d36 100755 --- a/postservice/30-one-mng +++ b/postservice/30-one-mng @@ -456,8 +456,11 @@ function init_ha() { function main() { wait_true_retcode "Wait for oned to be started" "onecluster show 0 > /dev/null" - if [ "$(CreoleGet activer_one_ha)" = "oui" ] && [ "$(CreoleGet one_ha_server_index)" = "0" ]; then - init_ha + if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then + + if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then + return + fi fi # # Rename default cluster @@ -490,6 +493,13 @@ function main() # Création des Datastores # manage_datastores "${clst_name}" + + # + # Dans le cas du mode HA, seul le leader fait l'init + # + if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then + init_ha + fi } main