Conditionnement sur le mode HA et Leader pour l'exécution de l'init_ha

This commit is contained in:
vincent 2019-02-22 14:02:50 +01:00
parent 2f7074ce3c
commit a85189fd8f
1 changed files with 12 additions and 2 deletions

View File

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