Conditionnement sur le mode HA et Leader pour l'exécution de l'init_ha
This commit is contained in:
parent
2f7074ce3c
commit
a85189fd8f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue