Skip to content

Commit

Permalink
fence_compute: Invert the force-down/service disable order
Browse files Browse the repository at this point in the history
In OpenStack Train we first observed that IHA was not working via
https://bugzilla.redhat.com/show_bug.cgi?id=1760213

The reason for this is that nova has made the disabling of the compute
service depend on the compute node being up via:
https://review.opendev.org/#/c/654596/

By first calling force-down, the subsequence service-disable API
call won't wait for the reachability of the compute node any
longer and the whole operation has the same outcome.

Tested this on an OSP Train environment and we correctly
got Instance HA working again and we observed the VMs being
restarted on the available compute nodes.

Co-Authored-By: Luca Miccini <lmiccini@redhat.com>
  • Loading branch information
mbaldessari and lmiccini committed Oct 11, 2019
1 parent 32d3681 commit 099758a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agents/compute/fence_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ def set_power_status_off(connection, options):
if status in [ "off" ]:
return

connection.services.disable(options["--plug"], 'nova-compute')
try:
# Until 2.53
connection.services.force_down(
options["--plug"], "nova-compute", force_down=True)
connection.services.disable(options["--plug"], 'nova-compute')
except Exception as e:
# Something went wrong when we tried to force the host down.
# That could come from either an incompatible API version
Expand Down

0 comments on commit 099758a

Please sign in to comment.