Browse Source

Merge "NovaCompute: Call "fence_compute -o on" after evacuation"

Jenkins 3 years ago
parent
commit
f178723d40
1 changed files with 5 additions and 18 deletions
  1. 5
    18
      ocf/NovaCompute

+ 5
- 18
ocf/NovaCompute View File

@@ -169,6 +169,8 @@ nova_start() {
169 169
 	ocf_log info "Pausing to give evacuations from ${NOVA_HOST} time to complete"
170 170
 	sleep ${OCF_RESKEY_evacuation_delay}
171 171
 
172
+	fence_compute ${fence_options} -o on -n ${NOVA_HOST}
173
+	attrd_updater -p -n evacuate -N ${NOVA_HOST} -D
172 174
     else
173 175
 	ocf_log info "Waiting for pending evacuations from ${NOVA_HOST}"
174 176
 	while [ "x$state" != "xno" -a "x$state" != x ]; do
@@ -178,6 +180,9 @@ nova_start() {
178 180
 
179 181
 	ocf_log info "Pausing to give evacuations from ${NOVA_HOST} time to complete"
180 182
 	sleep ${OCF_RESKEY_evacuation_delay}
183
+
184
+	fence_compute ${fence_options} -o on -n ${NOVA_HOST}
185
+	attrd_updater -p -n evacuate -N ${NOVA_HOST} -D
181 186
     fi
182 187
 
183 188
     export LIBGUESTFS_ATTACH_METHOD=appliance
@@ -190,24 +195,6 @@ nova_start() {
190 195
 	rc=$?
191 196
     done
192 197
 
193
-##   TEMPORARY disable call to "service enable" that seems to create
194
-##   issues and it is unnecessary since fence_compute doesn't disable
195
-##   the service
196
-
197
-#    if [ "x${OCF_RESKEY_domain}" != x ]; then
198
-#	export service_host="${NOVA_HOST}.${OCF_RESKEY_domain}"
199
-#    else
200
-#	export service_host="${NOVA_HOST}"
201
-#    fi
202
-
203
-#    python -c "import os; from novaclient import client as nova_client; nova = nova_client.Client('2', os.environ.get('OCF_RESKEY_username'), os.environ.get('OCF_RESKEY_password'), os.environ.get('OCF_RESKEY_tenant_name'), os.environ.get('OCF_RESKEY_auth_url')); nova.services.enable(os.environ.get('service_host'), 'nova-compute');"
204
-
205
-#    rc=$?
206
-#    if [ $rc != 0 ]; then
207
-#	ocf_exit_reason "nova.services.enable failed $rc"
208
-#	exit $OCF_NOT_RUNNING
209
-#    fi
210
-
211 198
     return $OCF_SUCCESS
212 199
 }
213 200
 

Loading…
Cancel
Save