Repository navigation
feat(cli): list read-only inventories across all hosts - #253
Merged
Merged
Conversation
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.
What
Plain
boxery lsalready lists every registered host, one section per host. This extends the same behavior to the other read-only, host-wide listings, so they stop silently reporting only the default host.Without
--host, these now print a section per host (same headings asls):lease ls(leases)pool lsversion: controller line, then each host, with the existing "host is behind" note per hostshapeshost capabilities/host backends(capabilities,backends)host upgrade --check(upgrade-host --check): each host's report under its own headingrunners status: read-only (config, leases, service state)snapshot images(images): one table with aHOSTcolumn instead of sectionsBefore / after
Captured on a machine with three registered hosts:
local(lima, default),exe, andhornet(libvirt, remote). Onlyhornethas pool VMs and images.boxery pool ls— pool VMs on the non-default host were invisibleBefore (only the default host):
After:
boxery snapshot images— one table, with a HOST columnBefore (only the default host):
After:
boxery version— each host's version, with the "behind" note per hostHere
hornetruns an older release than this checkout, so it gets its own warning.Before (only the default host):
After:
boxery upgrade-host --check— each host's report under its own headingBefore (only the default host):
After:
Unchanged
--host NAMEkeeps today's single-host behavior for all of them.--jsonkeeps meaning one host, as forls.upgrade-host/host upgrade(without--check) never fans out; it stays on the selected host.ls).Why
lease lsprinted(no leases)while a lease was held on another host,pool lsandsnapshot imageswere empty on the default host while another host had entries, andversioncould not show that a non-default host was behind.Implementation
controller/all-hosts.mjsholds the shared fan-out and rendering, reusinghostHeading/listedHostsfromcontroller/ls.mjsrather than a second grouping helper.isListing()filter incontroller/cli.mjs. Contract table, help text, goldens anddocs/cli.mdare updated.upgrade-host --checkreports on stderr; the second commit shows it under each host's heading rather than as prefixed lines after the table.Not in this PR
Commands that take a VM NAME (
agent ls NAME,jobs NAME, …) still only look on the selected host. Resolving a NAME across hosts (and failing on an ambiguous one, e.g. a VM calleddemoon two hosts) is a separate change.Testing
npm test(532 passed, 1 skipped),npm run lint,npm run typecheck,npm run docs:cli(no diff) andnpm run test:shellall pass. Newtest/cli-all-hosts.test.mjscovers the fan-out, theHOSTcolumn, partial failure,--host/--jsonstaying single-host, andupgrade-hostwithout--checknot fanning out. Also run by hand against three real hosts (lima, exe, libvirt).This was developed with an AI agent (pi) running in a Boxery VM and reviewed by me.