Skip to content

feat(cmd): add cobbler check command - #106

Open
SchoolGuy wants to merge 6 commits into
mainfrom
feat/cobbler-check
Open

SchoolGuy wants to merge 6 commits into
mainfrom
feat/cobbler-check

Conversation

@SchoolGuy

Copy link
Copy Markdown
Member
  • Add a new top-level cobbler check command that calls cobblerclient's existing Check() action and reports potential Cobbler server configuration problems (settings, missing dependencies, boot-loader files, services, etc.).
  • Output follows the classic Cobbler CLI UX: "No configuration problems found." when there are none, otherwise a numbered list of suggestions plus a reminder to restart cobblerd and run cobbler sync.
  • Register the command alphabetically in cmd/root.go, add a CHANGELOG.md entry, and add docs (docs/commands/check.rst + toctree entry).

@SchoolGuy SchoolGuy added this to the v1.0.0 milestone Oct 19, 2026
@github-project-automation github-project-automation Bot moved this to Pull Requests in Golang CLI Oct 19, 2026
SchoolGuy and others added 6 commits October 27, 2026 13:32
Expose cobblerclient's Check() action as a new top-level, zero-flag
command that reports potential Cobbler server configuration problems
in the classic numbered-list format.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The published cobblerd test image omits wget, which the server's
check action shells out to probe. Without it, cobbler check surfaces
as an XML-RPC fault instead of a reported suggestion, which broke
Test_CheckCmd in CI. Install wget on container startup via zypper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
convertMapStringToMapInterface, the shared helper that every
distro/profile/system/image add/copy/edit command uses to build the
XML-RPC payload for stringToString flags like --autoinstall-meta,
copied every value through as a flat string. Autoinstall-meta keys
that need a list or dict value (e.g. Agama's agama_modules, or
cloud-init's per-module settings like cloud_init_set_hostname) had no
way to be set correctly: the literal string got sent instead, which
built-in Jinja templates then misinterpreted (e.g. iterating a string
character-by-character where a list was expected).

Values starting with '[' or '{' are now decoded as JSON and sent as
the real nested value; anything that fails to parse, or doesn't look
like JSON, is left as a flat string exactly as before, so existing
usage is unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Also fix the coverage-upload step's version guard, which had been left
pointing at v4.0.0b5 since the previous bump to b6 and so never fired.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cobbler 4.0.0b7 split the XML-RPC bind-address env var into separate
IPv4/IPv6 variants and dropped the old combined COBBLER_XMLRPC_BIND_ADDRESS
name. Without this, cobblerd silently falls back to binding 127.0.0.1 only,
which breaks the published 25151 port the dev-stack script waits on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
v1.0.0-rc6's Settings.ConvertServerToIp (bool) can't decode Cobbler
4.0.0b7's reshaped convert_server_to_ip ({enabled, protocol}), which made
`cobbler setting edit`/`setting report` fail outright. v1.0.0-rc7 fixes the
field's type; verified `setting report`/`setting edit` and the full test
suite pass against a live v4.0.0b7 server.

Note: requires the cobbler/cobblerclient v1.0.0-rc7 tag to be pushed before
`go mod tidy`/CI will resolve it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Requests

Development

Successfully merging this pull request may close these issues.

1 participant