Repository navigation
SR view: list the host's SRs even when no VM uses them (#6) - #15
Merged
Merged
Conversation
Issue #6: on a host with no running VM, the SR view said "no storage mapping (xenstore)", and an SR only appeared while a VM had a disk on it. The rows were built from active VBDs alone. - xapi: on each refresh, read this host's plugged SRs (host UUID from xensource-inventory, then host -> PBDs -> SRs), leaving out udev (DVD drives, removable media) and ISO libraries. Bounded, sanitised and on the worker thread like the other lookups. - model: Snapshot.host_srs; compute() gives each one a row, idle when no disk is active on it, and takes xapi's exact type. - ui: without rows, say "no VM disks active on this host" unless the storage mapping itself is missing. - CHANGELOG: this, and the --lib fix from #10 under Security. Tested on an XCP-ng 8.3 host: of its six SRs only "Local storage" (ext) is listed; removable storage, DVD drives and three ISO SRs are left out. Its only SR is in use there, so the idle case is covered by the new unit tests (fake xapi, model). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6: with no running VM, the SR view showed "no storage mapping (xenstore)", and an SR only appeared while a VM used it. Rows were built from active VM disks only.
Changes
/etc/xensource-inventory, then host → PBDs → SRs. DVD drives and removable media (udev) and ISO libraries (content_type: iso) are left out. Bounded, sanitised, on the worker thread like the other lookups.Snapshot.host_srs;compute()gives each a row, idle (0 VBDs, 0 IOPS) when no disk is active on it, with xapi's exact type.--libfix from source: one module for loading the Xen libraries #10 under Security.Testing
INSTALLATION_UUIDparsing, idle rows incompute(). 81 tests, clippy, fmt pass.--batch): of its 6 SRs, only "Local storage" (ext) is listed; "Removable storage", "DVD drives" and 3 ISO SRs are left out, matchingxe sr-list/xe pbd-list. Its only SR is in use there, so the idle case itself is covered by the unit tests.Newly plugged SRs show up within the 3-minute name refresh.
🤖 Generated with Claude Code