From 94a498aef6151e746a25fa70115456750c7ad510 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Thu, 28 Feb 2019 11:51:39 +0100 Subject: [PATCH] Add info message for onehost_create_all on follower --- scripts/onehost_create_all | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/onehost_create_all b/scripts/onehost_create_all index a9943bc..af8a690 100755 --- a/scripts/onehost_create_all +++ b/scripts/onehost_create_all @@ -160,6 +160,18 @@ fi HAPY_HA=$(CreoleGet activer_one_ha "non") +master=1 +if [[ ${HAPY_HA} == "oui" ]]; then + idx=$(CreoleGet one_ha_server_index) + if [[ ${idx} != "0" ]]; then + EchoBleu "Mode HA: (on) Index : [${idx}]" + echo -e "\t$(basename ${0}) doit ĂȘtre lancĂ© uniquement sur le leader (index 0)" + exit 0 + else + master=0 + fi +fi + declare -a HAPY_SLV=('') ONEUSER=$(CreoleGet virt_user) HAPY_SLV=$(echo $(CreoleGet one_nodes) | sed -e "s/\n/ /g") @@ -175,14 +187,7 @@ then exit 1 fi -master=1 -if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then - if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then - exit 0 - else - master=0 - fi -fi + for host in ${HAPY_SLV}; do echo -e "\n" EchoOrange "Traitement du noeud ${host}"