mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-21 23:28:19 +00:00
045d1ce584
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>