2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 23:28:19 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Hilst 045d1ce584 fix(xcat-core): an unregistered RHEL service node still runs subscription-manager
enable_repo_commands chose subscription-manager from the vendor id and the presence of the
binary. An unregistered RHEL node has both, so the postscript ran
`subscription-manager repos --enable`, the command failed for want of a registration, and only
the fallback to `dnf config-manager` enabled the builder repository. The log named the
repository, not the registration.

The decision now takes the registration state. registered_with_subscription_manager reads the
exit status and the output of `subscription-manager identity`, which the postscript runs, and
enable_repo_commands emits the subscription-manager command only for a registered node. A
Foreman, Katello or Red Hat Satellite client registers through subscription-manager, so the same
path covers it, and the vendor id no longer decides. uses_subscription_manager is removed with
its caller.

service_node_artifacts_el.t asserts the probe against the registered and the unregistered output
of subscription-manager 1.30.12, against a missing binary, and against a call without root
privilege. It also asserts that an unregistered node runs no subscription-manager command.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-30 12:52:44 -03:00
Daniel Hilst 87234c8151 fix(xcat-core): a RHEL service node loses the enabled builder repository
The servicenode postscript enabled the builder repository with dnf
config-manager on every vendor. On RHEL that repository is defined in
/etc/yum.repos.d/redhat.repo, which subscription-manager owns and
regenerates, so the enabled flag does not survive the next refresh. The
builder repository turns off again and dnf install xCATsn stops resolving
perl-IO-Tty, perl-Crypt-CBC, perl-Crypt-Rijndael and perl(Expect).

ELBuilderRepo::enable_repo_commands returns the commands to try in order.
uses_subscription_manager names the vendors whose repository file
subscription-manager owns, beside builder_repo_ids which already names the
repository per vendor. RHEL asks subscription-manager first and keeps
config-manager as the fallback. Every other vendor gets config-manager
alone, which is what it had before.

service_node_artifacts_el.t asserts the command order per vendor. Without
the subscription-manager branch, the order assertion fails and no other
assertion does.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-30 07:27:31 -03:00
Daniel Hilst 740ea9c903 docs(xcat-server): the service node comments retold the incident
The comments added with the EL service node fixes carried the bug report: the
symptom on a named cell, the causal chain down to what the compute node sees,
and a claim that a step cannot fail the node. The comment rules put the symptom
and the chain in the commit and leave the invariant in the source.

Each one is cut to the fact the code cannot show: that EPEL and the builder
repository are both off on a fresh EL install, that exportfs refuses an NFS
mount without an explicit fsid, and that everything below a point in the
postscript runs commands on the node.

No executable line changes. The fast oracle passes.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-29 19:39:29 -03:00
Daniel Hilst 06cc43c863 test(xcat-test): the EL service node has no fast test of what it generates
Every service node defect in this change set was a generated artifact that was
already wrong before any node booted: a repository file that enabled no builder
repo, a template that resolved to the wrong installer, an exports line that was
never written. The tests that caught them are one file per fix, so each knows
one defect and together they know no defect class. A fix nobody has made yet is
covered by none of them.

service_node_artifacts_el.t renders the artifacts an EL service node needs from
one fixture and asserts each: the builder repository per release and vendor,
including that EL8 is powertools and not crb; the template the service profile
resolves, which must not be a Subiquity one; and the export line for a local
directory and for a re-exported mount, where an absent fsid is what made a
service node export nothing.

A missing module or sub fails rather than skips, and the file reports every gap
instead of dying at the first, because on an unfixed tree this test is the gap
report. Measured: 17 assertions pass on the branch, and the base fails two of
them by name.

It does not cover the boot half -- the lease, the tftp handover, the mount the
installer performs -- so it replaces no end-to-end run. It replaces the 45 to
90 minutes those runs cost in the ROUNDS of a minimization.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-29 16:15:40 -03:00