Vincent Febvre 2 months ago
parent
commit
eccde53736
1 changed files with 23 additions and 0 deletions
  1. 23
    0
      scripts/onehost_create_all

+ 23
- 0
scripts/onehost_create_all View File

@@ -156,6 +156,7 @@ if [[ $HAPY_NODE_SUPPORT == "non" ]]
156 156
 then
157 157
     EchoRouge "Le mode multi-noeuds n'est pas activé dans l'interface de configuration du module"
158 158
     exit 1
159
+<<<<<<< HEAD
159 160
 fi
160 161
 
161 162
 HAPY_HA=$(CreoleGet activer_one_ha "non")
@@ -172,6 +173,24 @@ if [[ ${HAPY_HA} == "oui" ]]; then
172 173
     fi
173 174
 fi
174 175
 
176
+=======
177
+fi
178
+
179
+HAPY_HA=$(CreoleGet activer_one_ha "non")
180
+
181
+master=1
182
+if [[ ${HAPY_HA} == "oui" ]]; then
183
+    idx=$(CreoleGet one_ha_server_index)
184
+    if [[ ${idx} != "0" ]]; then
185
+        EchoBleu "Mode HA: (on) Index : [${idx}]"
186
+        echo -e "\t$(basename ${0}) doit être lancé uniquement sur le leader (index 0)"
187
+        exit 0
188
+    else
189
+        master=0
190
+    fi
191
+fi
192
+
193
+>>>>>>> dcc8eeeecee5c5824e31c73b5ddf04590714f606
175 194
 declare -a HAPY_SLV=('')
176 195
 ONEUSER=$(CreoleGet virt_user)
177 196
 HAPY_SLV=$(echo $(CreoleGet one_nodes) | sed -e "s/\n/ /g")
@@ -213,6 +232,10 @@ for host in ${HAPY_SLV}; do
213 232
     fi
214 233
     sync_nodes
215 234
     if [[ ${HAPY_HA} != "oui" ]]
235
+<<<<<<< HEAD
236
+=======
237
+    then
238
+>>>>>>> dcc8eeeecee5c5824e31c73b5ddf04590714f606
216 239
         wait_node_ok ${HAPY_SLV[${i}]}
217 240
         if [[ ${?} -ne 0 ]]
218 241
         then