copie .one leader => follower
This commit is contained in:
parent
859d8f3cb7
commit
3da92ac827
@ -31,6 +31,12 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
function copy_files()
|
||||
{
|
||||
local host=${1}
|
||||
su - oneadmin -c "scp ~oneadmin/.one/* ${host}:oneadmin/.one/"
|
||||
}
|
||||
|
||||
#
|
||||
# NAME: register_node
|
||||
# AIM: register the node in OpenNebula master
|
||||
@ -138,11 +144,10 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
follower=1
|
||||
master=1
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||
if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
||||
follower=0
|
||||
exit 0
|
||||
else
|
||||
master=0
|
||||
fi
|
||||
@ -154,8 +159,8 @@ for host in ${HAPY_SLV}; do
|
||||
EchoVert " * Gestion des clés SSH"
|
||||
echo
|
||||
copy_ssh_id ${host}
|
||||
if [ $follower = 0 ]; then
|
||||
continue
|
||||
if [ $master = 0 ]; then
|
||||
copy_files ${host}
|
||||
fi
|
||||
|
||||
EchoVert " * Enregistrement du noeud"
|
||||
|
Loading…
Reference in New Issue
Block a user