Skip to content

[4.22.1.0-shapeblue1] KVM HA: fence by confirming host power state (fix host stuck in Fencing when already powered off)#139

Open
harikrishna-patnala wants to merge 1 commit into
4.22.1.0-shapeblue1from
fix/kvm-ha-fence-already-off-4.22.1
Open

[4.22.1.0-shapeblue1] KVM HA: fence by confirming host power state (fix host stuck in Fencing when already powered off)#139
harikrishna-patnala wants to merge 1 commit into
4.22.1.0-shapeblue1from
fix/kvm-ha-fence-already-off-4.22.1

Conversation

@harikrishna-patnala

Copy link
Copy Markdown
Member

Description

This PR is a duplicate of upstream PR apache#13377 to address the same in the ShapeBlue custom patch 4.22.1.0-shapeblue1

cc @andrijapanicsb

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

KVMHAProvider.fence() declared a host fenced only when the out-of-band power-off
command reported success. Against an already-off chassis the BMC rejects the
power-off (e.g. Redfish returns HTTP 409), so fence() failed and the host stayed
stuck in the Fencing HA state, which maps to Disconnected (not Down). VM-HA
therefore never restarted the VMs until the dead host was powered back on.

Fencing now succeeds based on the actual chassis power state:
 - if the host is already powered off (OOBM STATUS == Off), treat it as fenced;
 - otherwise issue a best-effort power-off and confirm via OOBM STATUS;
 - only a confirmed Off state counts as success; if the state cannot be confirmed
   (e.g. unreachable BMC) the fence fails and is retried, to avoid split-brain.

Also map Redfish PowerOperation.OFF to ForceOff (hard power-off) instead of
GracefulShutdown, consistent with the ipmitool driver and appropriate for fencing
an unresponsive host (SOFT remains the graceful ACPI shutdown).

Fixes apache#13376
@harikrishna-patnala

Copy link
Copy Markdown
Member Author

@blueorangutan package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants