Browse Source

Add info message for onehost_create_all on follower

tags/pkg/stable/eole-2.7.0/1.0.0-0
Philippe Caseiro 5 months ago
parent
commit
94a498aef6
1 changed files with 13 additions and 8 deletions
  1. 13
    8
      scripts/onehost_create_all

+ 13
- 8
scripts/onehost_create_all View File

@@ -160,6 +160,18 @@ fi
160 160
 
161 161
 HAPY_HA=$(CreoleGet activer_one_ha "non")
162 162
 
163
+master=1
164
+if [[ ${HAPY_HA} == "oui" ]]; then
165
+    idx=$(CreoleGet one_ha_server_index)
166
+    if [[ ${idx} != "0" ]]; then
167
+        EchoBleu "Mode HA: (on) Index : [${idx}]"
168
+        echo -e "\t$(basename ${0}) doit être lancé uniquement sur le leader (index 0)"
169
+        exit 0
170
+    else
171
+        master=0
172
+    fi
173
+fi
174
+
163 175
 declare -a HAPY_SLV=('')
164 176
 ONEUSER=$(CreoleGet virt_user)
165 177
 HAPY_SLV=$(echo $(CreoleGet one_nodes) | sed -e "s/\n/ /g")
@@ -175,14 +187,7 @@ then
175 187
     exit 1
176 188
 fi
177 189
 
178
-master=1
179
-if [ "$(CreoleGet activer_one_ha)" = "oui" ]; then
180
-    if [ "$(CreoleGet one_ha_server_index)" != "0" ]; then
181
-        exit 0
182
-    else
183
-        master=0
184
-    fi
185
-fi
190
+
186 191
 for host in ${HAPY_SLV}; do
187 192
     echo -e "\n"
188 193
     EchoOrange "Traitement du noeud ${host}"

Loading…
Cancel
Save