Merge branch 'develop' into dist/eole/2.7.0/develop
This commit is contained in:
commit
d89f1dfdeb
|
@ -200,6 +200,7 @@
|
||||||
<target type="variable">one_database_name</target>
|
<target type="variable">one_database_name</target>
|
||||||
<target type="variable">one_database_user</target>
|
<target type="variable">one_database_user</target>
|
||||||
<target type="variable">one_database_pass</target>
|
<target type="variable">one_database_pass</target>
|
||||||
|
<target type="variable">one_database_connections</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition name='disabled_if_in' source='activer_multinode'>
|
<condition name='disabled_if_in' source='activer_multinode'>
|
||||||
|
|
|
@ -442,22 +442,10 @@ function manage_datastores()
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function init_ha() {
|
|
||||||
# server with index 1 exists if already instanciate
|
|
||||||
onezone show 0 | grep -A 3 ^"HA & FEDERATION SYNC STATUS" | tail -n 1 | grep -q ^" 1 "
|
|
||||||
if [ ! $? = 0 ]; then
|
|
||||||
FOLLOWER=$(CreoleGet one_nodes)
|
|
||||||
for follower in $FOLLOWER; do
|
|
||||||
onezone server-add 0 --name $follower --rpc http://$follower:2633/RPC2
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
wait_true_retcode "Wait for oned to be started" "onecluster show 0 > /dev/null"
|
wait_true_retcode "Wait for oned to be started" "onecluster show 0 > /dev/null"
|
||||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||||
|
|
||||||
if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -493,13 +481,8 @@ function main()
|
||||||
# Création des Datastores
|
# Création des Datastores
|
||||||
#
|
#
|
||||||
manage_datastores "${clst_name}"
|
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
|
main
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function init_ha() {
|
||||||
|
# server with index 1 exists if already instanciate
|
||||||
|
onezone show 0 | grep -A 3 ^"HA & FEDERATION SYNC STATUS" | tail -n 1 | grep -q ^" 1 "
|
||||||
|
if [ ! $? = 0 ]; then
|
||||||
|
FOLLOWER=$(CreoleGet one_nodes)
|
||||||
|
for follower in $FOLLOWER; do
|
||||||
|
onezone server-add 0 --name $follower --rpc http://$follower:2633/RPC2
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||||
|
if [ "$(CreoleGet one_ha_server_index)" = "0" ]; then
|
||||||
|
init_ha
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue