diff --git a/diagnose/04-virtualisation b/diagnose/04-virtualisation index 58fbb0d..dfc15a5 100755 --- a/diagnose/04-virtualisation +++ b/diagnose/04-virtualisation @@ -80,7 +80,7 @@ then echo "" else for VM in $VMs ; do - NAME=$( one "onevm show $VM" | grep 'NAME' | cut -d: -f2 ) + NAME=$( one "onevm show $VM" | grep '^NAME' | cut -d: -f2 ) STAT=$(one "onevm show $VM" | grep '^STATE' | cut -d: -f2 | tr -d ' ' ) printf ". %${len_pf}s => " "$NAME" eOneStatus "$STAT" diff --git a/dicos/29_one-master.xml b/dicos/29_one-master.xml index 0f6619f..7657de7 100644 --- a/dicos/29_one-master.xml +++ b/dicos/29_one-master.xml @@ -7,6 +7,7 @@ + opennebula opennebula-scheduler @@ -233,6 +234,7 @@ one_vip one_vip_mask sunstone_xmlrpc + one_ha diff --git a/postservice/31-one-netmng b/postservice/31-one-netmng index 4fd5ec6..abb2a40 100755 --- a/postservice/31-one-netmng +++ b/postservice/31-one-netmng @@ -303,6 +303,14 @@ def main(): logger.debug(u"Configure OpenNebula networks") client = CreoleClient() + + mode_ha = client.get_creole('activer_one_ha') + if mode_ha == "oui": + indx = client.get_creole('one_ha_server_index') + if indx != 0: + # Mode HA is on and we are not in the Leader + exit(0) + one_client = OneClient('oneadmin') networks = [] cluster = client.get_creole('one_cluster_name') diff --git a/scripts/onehost_create_all b/scripts/onehost_create_all index af8a690..a3ac59e 100755 --- a/scripts/onehost_create_all +++ b/scripts/onehost_create_all @@ -201,7 +201,6 @@ for host in ${HAPY_SLV}; do EchoVert " * Enregistrement du noeud" register_node ${host} - # wait_node_ok ${host} if [[ ${HAPY_HA} == "oui" ]] then if [[ $DBMODE == "sqlite" ]] @@ -213,10 +212,12 @@ for host in ${HAPY_SLV}; do fi fi sync_nodes - wait_node_ok ${HAPY_SLV[${i}]} - if [[ ${?} -ne 0 ]] - then - EchoRouge "Erreur lors de l'enregistrement du noeud ${HAPY_SLV[${i}]} !" + if [[ ${HAPY_HA} != "oui" ]] + wait_node_ok ${HAPY_SLV[${i}]} + if [[ ${?} -ne 0 ]] + then + EchoRouge "Erreur lors de l'enregistrement du noeud ${HAPY_SLV[${i}]} !" + fi fi done diff --git a/tmpl/60-one b/tmpl/60-one new file mode 100644 index 0000000..24d4dfc --- /dev/null +++ b/tmpl/60-one @@ -0,0 +1,5 @@ +#!/bin/bash + +%for %%host in %%one_nodes +/sbin/iptables -A eth%%{one_node_int}-root -s %%host -p tcp --syn -j ACCEPT +%end for