|
|
6147c0 |
From 099758a41bbb153c4a13a89de57cdcb72e1f1ea7 Mon Sep 17 00:00:00 2001
|
|
|
6147c0 |
From: Michele Baldessari <michele@acksyn.org>
|
|
|
6147c0 |
Date: Fri, 11 Oct 2019 10:39:53 +0200
|
|
|
6147c0 |
Subject: [PATCH] fence_compute: Invert the force-down/service disable order
|
|
|
6147c0 |
|
|
|
6147c0 |
In OpenStack Train we first observed that IHA was not working via
|
|
|
6147c0 |
https://bugzilla.redhat.com/show_bug.cgi?id=1760213
|
|
|
6147c0 |
|
|
|
6147c0 |
The reason for this is that nova has made the disabling of the compute
|
|
|
6147c0 |
service depend on the compute node being up via:
|
|
|
6147c0 |
https://review.opendev.org/#/c/654596/
|
|
|
6147c0 |
|
|
|
6147c0 |
By first calling force-down, the subsequence service-disable API
|
|
|
6147c0 |
call won't wait for the reachability of the compute node any
|
|
|
6147c0 |
longer and the whole operation has the same outcome.
|
|
|
6147c0 |
|
|
|
6147c0 |
Tested this on an OSP Train environment and we correctly
|
|
|
6147c0 |
got Instance HA working again and we observed the VMs being
|
|
|
6147c0 |
restarted on the available compute nodes.
|
|
|
6147c0 |
|
|
|
6147c0 |
Co-Authored-By: Luca Miccini <lmiccini@redhat.com>
|
|
|
6147c0 |
---
|
|
|
6147c0 |
agents/compute/fence_compute.py | 2 +-
|
|
|
6147c0 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6147c0 |
|
|
|
6147c0 |
diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py
|
|
|
6147c0 |
index a94bdc46..c08a9dbe 100644
|
|
|
6147c0 |
--- a/agents/compute/fence_compute.py
|
|
|
6147c0 |
+++ b/agents/compute/fence_compute.py
|
|
|
6147c0 |
@@ -117,11 +117,11 @@ def set_power_status_off(connection, options):
|
|
|
6147c0 |
if status in [ "off" ]:
|
|
|
6147c0 |
return
|
|
|
6147c0 |
|
|
|
6147c0 |
- connection.services.disable(options["--plug"], 'nova-compute')
|
|
|
6147c0 |
try:
|
|
|
6147c0 |
# Until 2.53
|
|
|
6147c0 |
connection.services.force_down(
|
|
|
6147c0 |
options["--plug"], "nova-compute", force_down=True)
|
|
|
6147c0 |
+ connection.services.disable(options["--plug"], 'nova-compute')
|
|
|
6147c0 |
except Exception as e:
|
|
|
6147c0 |
# Something went wrong when we tried to force the host down.
|
|
|
6147c0 |
# That could come from either an incompatible API version
|