gestion de la copie des clefs pour les followers
This commit is contained in:
parent
f945e19efb
commit
41d45ed2a2
@ -447,6 +447,7 @@ function main()
|
||||
wait_true_retcode "Wait for oned to be started" "onecluster show 0 > /dev/null"
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||
if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
||||
# ne pas faire sur les followers
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@ -461,11 +462,15 @@ function main()
|
||||
#
|
||||
# Creating Host
|
||||
#
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||
/usr/share/eole/sbin/onehost_create_all
|
||||
else
|
||||
if [[ $(CreoleGet eole_module non) != 'hapy-master' ]]
|
||||
then
|
||||
host=$(CreoleGet nom_machine)
|
||||
manage_host ${host}
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Attaching Host to the Cluster
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function init_ha() {
|
||||
function init_ha_leader() {
|
||||
# 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
|
||||
@ -13,7 +13,7 @@ function init_ha() {
|
||||
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||
if [ "$(CreoleGet one_ha_server_index)" = "0" ]; then
|
||||
init_ha
|
||||
init_ha_leader
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -103,6 +103,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ] && [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
||||
follower=0
|
||||
else
|
||||
follower=1
|
||||
fi
|
||||
for ((i = 0; i < ${#HAPY_SLV[*]}; i +=1))
|
||||
do
|
||||
echo -e "\n"
|
||||
@ -112,6 +117,9 @@ do
|
||||
echo
|
||||
copy_ssh_id ${HAPY_SLV[${i}]}
|
||||
[[ ${?} -ne 0 ]] && EchoRouge "Erreur lors de l'échange de clés SSH avec le noeud ${HAPY_SLV[${i}]}}"
|
||||
if [ $follower = 0 ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
EchoVert " * Enregistrement du noeud"
|
||||
register_node ${HAPY_SLV[${i}]}
|
||||
|
Loading…
Reference in New Issue
Block a user