Bug 1039910

Summary: [RFE] Use subscription-manager in kickstart template, not rhnreg_ks
Product: Red Hat OpenStack Reporter: Dominic Cleal <dcleal>
Component: foremanAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: high Docs Contact:
Priority: medium    
Version: 4.0CC: aberezin, ajeain, cpelland, dnavale, jguiditt, morazi, rhos-maint, sputhenp, sreichar, yeylon
Target Milestone: z4Keywords: FutureFeature, OtherQA, Rebase, Triaged, ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/3842
Whiteboard:
Fixed In Version: foreman-1.3.0.4-1.el6sat Doc Type: Enhancement
Doc Text:
With this release, subscription-manager support when provisioning hosts has been added to Foreman. As a result, subscription-manager can now be used by setting the following parameters globally, on a per-OS or per-host basis: subscription_manager = true subscription_manager_username subscription_manager_password subscription_manager_repos = comma separated list of repositories to enable
Story Points: ---
Clone Of:
: 1073087 (view as bug list) Environment:
Last Closed: 2014-05-29 19:57:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1040649, 1073087    

Description Dominic Cleal 2013-12-10 10:02:33 UTC
Description of problem:
The default RHEL kickstart template uses rhnreg_ks in the redhat_register snippet to register the newly provisioned host, however this is now deprecated in favour of subscription-manager.

A new snippet should be added for rhsm support and the templates updated to use it.  The snippet should support enabling non-default repos too.

openstack-foreman-installer ships its own kickstart template, so this will also need updating if it's still in use.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. provision a new host from Foreman with RHN(S) and activation keys set
2. check if /etc/yum.repos.d/redhat.repo is populated
3. check if /etc/sysconfig/rhn/systemid exists

Actual results:
redhat.repo doesn't exist
systemid exists

Expected results:
redhat.repo should be present and populated
systemid should not exist

Additional info:

Comment 2 Dominic Cleal 2014-02-07 15:04:21 UTC
Please see the documentation in the redhat_register snippet so you know which parameters to set to use RHSM rather than rhnreg_ks:

https://github.com/theforeman/community-templates/blob/76bb71b76/snippets/redhat_register.erb#L14-L30

Comment 4 Dominic Cleal 2014-02-13 08:53:21 UTC
*** Bug 1062709 has been marked as a duplicate of this bug. ***

Comment 8 Dominic Cleal 2014-04-04 16:43:34 UTC
A bug was found by Jiri that affected the snippet on RHEL 6.4.  It's been fixed in 1.3.0.4 with this change: https://github.com/theforeman/community-templates/commit/6a66f3908b2c8729d311507ec5e56ee2f34e01c7

Comment 10 Jason Guiditta 2014-05-23 20:59:56 UTC
redhat_register snippet contains the described fix, linked above.

Comment 12 errata-xmlrpc 2014-05-29 19:57:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0577.html