Merge branch 'develop' into dist/eole/2.7.0/develop
This commit is contained in:
commit
458e5b4ca2
|
@ -1,5 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
/usr/share/eole/sbin/onehost_create_all
|
||||
ha=$(CreoleGet activer_one_ha non)
|
||||
if [[ ${ha} == "oui" ]]
|
||||
then
|
||||
indx=$(CreoleGet one_ha_server_index)
|
||||
else
|
||||
indx="0"
|
||||
fi
|
||||
|
||||
if [[ ${1} == "instance" ]] && [[ ${indx} == "0" ]]
|
||||
then
|
||||
/usr/share/eole/sbin/onehost_create_all
|
||||
fi
|
||||
exit 0
|
||||
|
|
|
@ -28,6 +28,7 @@ EOF
|
|||
REMOTEKEY=$(su - oneadmin -c "ssh ${host} 'cat ~oneadmin/.ssh/id_rsa.pub'")
|
||||
if ! grep -qs "$REMOTEKEY" ~oneadmin/.ssh/authorized_keys; then
|
||||
su - oneadmin -c "echo ${REMOTEKEY} >> ~oneadmin/.ssh/authorized_keys"
|
||||
su - oneadmin -c "ssh-keyscan $host"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -159,6 +160,18 @@ fi
|
|||
|
||||
HAPY_HA=$(CreoleGet activer_one_ha "non")
|
||||
|
||||
master=1
|
||||
if [[ ${HAPY_HA} == "oui" ]]; then
|
||||
idx=$(CreoleGet one_ha_server_index)
|
||||
if [[ ${idx} != "0" ]]; then
|
||||
EchoBleu "Mode HA: (on) Index : [${idx}]"
|
||||
echo -e "\t$(basename ${0}) doit être lancé uniquement sur le leader (index 0)"
|
||||
exit 0
|
||||
else
|
||||
master=0
|
||||
fi
|
||||
fi
|
||||
|
||||
declare -a HAPY_SLV=('')
|
||||
ONEUSER=$(CreoleGet virt_user)
|
||||
HAPY_SLV=$(echo $(CreoleGet one_nodes) | sed -e "s/\n/ /g")
|
||||
|
@ -174,14 +187,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
master=1
|
||||
if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
|
||||
if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
|
||||
exit 0
|
||||
else
|
||||
master=0
|
||||
fi
|
||||
fi
|
||||
|
||||
for host in ${HAPY_SLV}; do
|
||||
echo -e "\n"
|
||||
EchoOrange "Traitement du noeud ${host}"
|
||||
|
|
Loading…
Reference in New Issue