copie .one leader => follower

This commit is contained in:
Emmanuel Garette 2019-02-25 15:45:40 +01:00
parent 859d8f3cb7
commit 3da92ac827

View File

@ -31,6 +31,12 @@ EOF
fi fi
} }
function copy_files()
{
local host=${1}
su - oneadmin -c "scp ~oneadmin/.one/* ${host}:oneadmin/.one/"
}
# #
# NAME: register_node # NAME: register_node
# AIM: register the node in OpenNebula master # AIM: register the node in OpenNebula master
@ -138,11 +144,10 @@ then
exit 1 exit 1
fi fi
follower=1
master=1 master=1
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
follower=0 exit 0
else else
master=0 master=0
fi fi
@ -154,8 +159,8 @@ for host in ${HAPY_SLV}; do
EchoVert " * Gestion des clés SSH" EchoVert " * Gestion des clés SSH"
echo echo
copy_ssh_id ${host} copy_ssh_id ${host}
if [ $follower = 0 ]; then if [ $master = 0 ]; then
continue copy_files ${host}
fi fi
EchoVert " * Enregistrement du noeud" EchoVert " * Enregistrement du noeud"