• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 40669230116
79%
master: 79%

Build:
Build:
LAST BUILD BRANCH: 26.1-lcm
DEFAULT BRANCH: master
Ran 28 Oct 2026 10:05AM UTC
Jobs 1
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Oct 2026 10:04AM UTC coverage: 78.996%. Remained the same
40669230116

push

github

web-flow
Release leftover HA static VDIs when HA is disabled at startup (#7341)

This patch fixes an issue where the HA statefile and metadata VDIs
remain attached to dom0 after a host restart, even if HA has been
disabled on the pool. Here is the scenario:
- HA is enabled on the pool
- A host is fenced, so it is shut down
- HA is disabled on the pool. ha_release_resources is called on live
hosts but the fenced one doesn't receive the cleanup and keeps the
statefile and metadata VDIs in /etc/xensource/static-vdis
- The fenced host restarts:
- Its local database still has ha.armed set to true, so
on_server_restart attached the static VDIs and tries to start the HA
daemon
- ha_start_daemon fails with MTC_EXIT_INVALID_POOL_STATE because the
pool is no longer in HA mode. While failing, it sets ha.armed to false
in the local database without releasing the static VDIs
- Later resynchronise_ha_state sees HA disabled on both localhost and
the pool. So the (true, false) case, which normally calls
ha_release_resources, is not taken and no cleanup is done. At the end of
the boot, the statefile and the metadata VDIs are still attached to dom0
and must be removed manually with "static-vdis detach/del".

So the patch adds release_local_ha_static_vdis that deactivates and
detaches any HA statefile or metadata VDI still configured as a static
VDI on the host, and calls it in the (false, false) case of
resynchronise_ha_state. When nothing is left behind it does nothing.

ha_release_resources now also uses this helper. It used
Db.Pool.get_ha_statefiles to find statefiles, but a statefile attached
on the host always has a local static-vdis entry, so the local
configuration is what this host actually need to release. Metadata VDIs
were already found using the local configuration.
Xha_metadata_vdi.deactivate_and_detach_existing is no longer used and is
removed.

Tracking-reference: XCPNG-3914

3667 of 4642 relevant lines covered (79.0%)

0.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 40669230116.1 28 Oct 2026 10:05AM UTC 36
79.0
GitHub Action Run
Source Files on build 40669230116
  • Tree
  • List 36
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40669230116
  • 02b30945 on github
  • Prev Build on gh-readonly-queue/master/pr-7357-e2d37d9c0949ebdab915c0f4061ac3b0e90341c9 (#40663817158)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc