Skip to content

Fixes #39272 - Remove outdated references from redhat_register snippet#10965

Merged
jeremylenz merged 1 commit intotheforeman:developfrom
jeremylenz:fixes-39272-redhat-register-cleanup
May 4, 2026
Merged

Fixes #39272 - Remove outdated references from redhat_register snippet#10965
jeremylenz merged 1 commit intotheforeman:developfrom
jeremylenz:fixes-39272-redhat-register-cleanup

Conversation

@jeremylenz
Copy link
Copy Markdown
Contributor

Remove obsolete Spacewalk/RHN, auto-attach, and subscription pool references from the redhat_register provisioning template snippet, and modernize syspurpose CLI usage.

Changes

  • Remove entire Spacewalk/RHN registration section (rhnreg_ks, RHN certs, up2date config) — Spacewalk/RHN Satellite 5 is long obsolete
  • Remove subscription_manager_pool and subscription_manager_auto_attach support — all orgs are now SCA-only
  • Remove --auto-attach flag from username/password registration
  • Update syspurpose to use subscription-manager syspurpose subcommands instead of the deprecated standalone /usr/sbin/syspurpose CLI binary (no longer requires installing subscription-manager-syspurpose package)
  • Remove outdated RHEL 6.4 bug workaround comment

How to test

Prerequisites

A provisioning setup with a RHEL-compatible host, or review the template rendering output.

Steps

  1. Review the diff to confirm only obsolete functionality was removed
  2. Verify snapshot test output shows the expected changes:
    • Old syspurpose set-role/set-usage/set-sla commands replaced with subscription-manager syspurpose role/usage/service-level --set
    • subscription-manager-syspurpose package install block removed
    • /usr/sbin/syspurpose binary check removed
  3. Confirm RHEL 9/10 snapshots are unaffected (they use kickstart_rhsm instead of redhat_register)
  4. Run bundle exec rake test TEST=test/unit/foreman/renderer_test.rb — all 168 tests should pass

🤖 Generated with Claude Code

puppet_enabled = !host_param_true?('skip-puppet-setup') && (host_puppet_server.present? || host_param_true?('force-puppet'))
salt_enabled = host_param('salt_master') ? true : false
sles_minor_string = (os_minor == 0) ? '' : "_SP#{os_minor}"
spacewalk_enabled = host_param('spacewalk_host') ? true : false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it certain people aren't still using Spacewalk? I recall talking some time ago with some upstream users who were considering moving to Katello from Spacewalk which is forked upstream.

Of course it's so old, but are the Spacewalk bits causing troubles somewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't know how to answer this question. I'm not sure if we're still expected to support it in any way. any thoughts @sideangleside ?

@jeremylenz
Copy link
Copy Markdown
Contributor Author

@ianballou Seems Spacewalk itself is dead. At one point it was forked by https://www.uyuni-project.org/pages/faq.html and that seems to be the only surviving descendant. I don't know if anyone in the Foreman community uses it, or if it would even be compatible with Foreman provisioning templates.

@ianballou
Copy link
Copy Markdown
Contributor

@ianballou Seems Spacewalk itself is dead. At one point it was forked by https://www.uyuni-project.org/pages/faq.html and that seems to be the only surviving descendant. I don't know if anyone in the Foreman community uses it, or if it would even be compatible with Foreman provisioning templates.

Since these are all provisioning templates, users could just put their own custom one in if they really need it. Spacewalk is truly incredibly old and the cleanup here should help reduce our maintenance burden.

Copy link
Copy Markdown
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, I tested rendering these via Foreman::Renderer.render.

Remove Spacewalk and RHN references from redhat_register snippet
and AutoYaST SLES template, as these services are long
discontinued.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremylenz jeremylenz force-pushed the fixes-39272-redhat-register-cleanup branch from 46ac3fc to fa9be51 Compare May 4, 2026 16:29
@jeremylenz
Copy link
Copy Markdown
Contributor Author

squashed

@jeremylenz jeremylenz merged commit f2d892f into theforeman:develop May 4, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants