Add info message for onehost_create_all on follower

This commit is contained in:
Philippe Caseiro 2019-02-28 11:51:39 +01:00
parent d7a4769ec0
commit 94a498aef6
1 changed files with 13 additions and 8 deletions

View File

@ -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}"