fusion one_followers_domain et one_nodes

This commit is contained in:
2019-02-21 13:59:39 +01:00
parent 693532b324
commit 8c28ae6e6b
8 changed files with 57 additions and 99 deletions

View File

@ -446,7 +446,7 @@ 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_followers_domain)
FOLLOWER=$(CreoleGet one_nodes)
for follower in $FOLLOWER; do
onezone server-add 0 --name $follower --rpc http://$follower:2633/RPC2
done
@ -456,7 +456,7 @@ function init_ha() {
function main()
{
wait_true_retcode "Wait for oned to be started" "onecluster show 0 > /dev/null"
if [ "$(CreoleGet one_ha_role none)" = "leader" ]; then
if [ "$(CreoleGet one_ha_server_index)" = "0" ]; then
init_ha
fi
#