Problem building RHEL hosts after 2.5 upgrade

After upgrading from 2.4.x to 2.5.4, we started getting errors when attempting to build RHEL hosts which were configured with subscription manager settings. It was complaining about not being able to access the katello_agent_enabled value due to Safe Mode.

It looks like this change was merged in for the 2.5 release: Fixes #32458 - Disable katello agent install by default when provisioning by jturel · Pull Request #8480 · theforeman/foreman · GitHub

I don’t see a reference to katello_agent_enabled anywhere else in the Foreman codebase, and it looks like this may be a Katello specific function. We are not running Katello in our Foreman install.

Our simple fix was to unlock and revert the redhat_register snippet to its previous value, removing the reference to katello_agent_enabled value, and builds started working again. I imagine this change will be reverted upon our next upgrade, and since I don’t see any further changes or references in the latest Foreman codebase regarding this value, I suspect the error will return as well.

Has anyone else run into this problem, or has a suggestion for a better solution?

@ncstate-mafields that is indeed calling some katello-specific code. Very good chance that was an oversight on our part. I think you should be able to set the ‘redhat_install_agent’ host param to false as a workaround rather than having to modify the provisioning template. Let me know if that works for you.

We did try that, but it seems that the template refuses to compile even when the katello value wouldn’t be used. The only way we found forward was to remove the katello_agent_enabled reference.

Thanks for confirming. I’d agree this is a bug. Do you have an account in our Redmine? You should rightly report it. If you don’t have an account I can file the report as well.

I thought I did, and the username ncstate-mafields is already taken, but it doesn’t appear to be associated with my email address so I can’t issue a password reset for the account.

If you wouldn’t mind filing the bug report while I get that sorted out, I’d appreciate it.