Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA-386552 XSI-1534 Failed to disable pool HA after missing HA statefile #5941

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

lindig
Copy link
Contributor

@lindig lindig commented Aug 19, 2024

Backport 5a639b1

The issue arises because:

  • xapi_ha.ml, function disable_internal
  • When a static VDI is removed from an SR (manually by deleting it from an NFS server, for example)
  • As the SR is re-scanned, it is also removed from the xapi database
  • But the re-scan does not remove it from the list of static VDIs in /etc/xensource/static-vidis
  • when the function is called, it obtains the list of static VDIs (the UUIds)
  • and looks them up in the database - which fails
  • static VDIs references are further listed in Pool.ha_statefile and can be stale.

This patch hardens the code path to avoid failure when the statefile VDI has been removed manually.

Backport 5a639b1

The issue arises because:

* xapi_ha.ml, function disable_internal
* When a static VDI is removed from an SR (manually by deleting it from
  an NFS server, for example)
* As the SR is re-scanned, it is also removed from the xapi database
* But the re-scan does not remove it from the list of static VDIs in
  /etc/xensource/static-vidis
* when the function is called, it obtains the list of static VDIs (the
  UUIds)
* and looks them up in the database - which fails
* static VDIs references are further listed in Pool.ha_statefile and can
  be stale.

This patch hardens the code path to avoid failure when the statefile VDI
has been removed manually.

Signed-off-by: Christian Lindig <[email protected]>
Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a faithful backport

@lindig lindig merged commit 8744458 into xapi-project:1.249-lcm Aug 19, 2024
5 checks passed
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.

3 participants