Bug 442630

Summary: In Satellite 5.1, when kickstarting a new system using an activation key that changes the system's base channel, rhnreg_ks fails and new system not being registered to the satellite.
Product: Red Hat Satellite 5 Reporter: Stuart R. Kirk <Stuart.Kirk>
Component: RegistrationAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 510CC: alfredo.horta, danny.howard, degts, dherrman, jschrode, pep, tao, tscherf
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat511 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-13 19:03:09 UTC Type: ---
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: 429319, 448773    
Attachments:
Description Flags
Kickstart post-install log.
none
Actual kickstart file being used as shown from WEBUI
none
Kickstart viewed from URL with two activation keys
none
Output from SQL queries confirming the base channel conflict none

Description Stuart R. Kirk 2008-04-15 21:18:39 UTC
Description of problem:

When an activation key is used during a kickstart to change the base channel of
the newly built system the system fails to register to the satellite server as
rhnreg_ks errors out with a "Conflicting base channels" message.

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

RHNS 5.1.0-181 (upgraded from 5.0)
OS being built using kickstart tree: RHEL4.6 AS x86_64 U6

How reproducible:

See below.


Steps to Reproduce:
1. Install RHNS 5.1-181
2. Sync in a RHEL channel
3. Clone the RHEL channel you sync'd in to create a custom base channel
4. Create an activation key that points to this new custom base channel
5. Create a kickstart that builds off of the proper ks tree but uses the above
activation key to switch base channels at system build time
6. Kickstart a new system  
Actual results:

Output from the rhnreg_ks command in the kickstart file:

Error Message:
    Conflicting base channels
Error Class Code: 63
Error Class Info: Conflicting activation tokens
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Output from the two rhn_check commands in the kickstart file:

ERROR: unable to read system id.
ERROR: unable to read system id.

If you are running any up2date/yum updates in custom post install scripts, this
will of course cause the build to hang since it will be prompting the user to
register to rhn.

Expected results:

I would expect the system's base channel to modify when the rhnreg_ks directive
is issued and subsequently register the newly built system to the satellite
server allowing the following two rhn_check commands to succedd.

Additional info:

It appears that the URL that is actually called to obtain the kickstart file
produces a different rhnreg_ks line than the one that is displayed when you look
at the "kickstart file" tab in the WebUI.  In the latter, there is only the
singular activation key that is present which is what the user has selected via
the WebUI.  However viewing the actual URL, there are two different activation
keys present which have different base channels associated with them which
causes this error.

Comment 1 Stuart R. Kirk 2008-04-15 21:18:39 UTC
Created attachment 302526 [details]
Kickstart post-install log.

Comment 2 Stuart R. Kirk 2008-04-15 21:19:17 UTC
Created attachment 302527 [details]
Actual kickstart file being used as shown from WEBUI

Comment 3 Stuart R. Kirk 2008-04-15 21:20:14 UTC
Created attachment 302529 [details]
Kickstart viewed from URL with two activation keys

Comment 4 Stuart R. Kirk 2008-04-15 21:21:11 UTC
Created attachment 302530 [details]
Output from SQL queries confirming the base channel conflict

Comment 5 Justin Sherrill 2008-04-16 21:50:51 UTC
fixed in rev 171299 (can be reverted if needed)

Comment 6 Justin Sherrill 2008-04-17 15:24:56 UTC
backported to 5.1 in 171324.

Comment 8 Clifford Perry 2008-05-02 18:39:44 UTC
Flip from ON_DEV to MODIFIED. MASS move for Sat bugs. 

Comment 10 Justin Sherrill 2008-05-23 18:44:08 UTC
Preethi, 

we had talked and I can't seem to reproduce this, and your reproducer wasn't
working either, so you are going to re-qa this bug.

-Justin

Comment 11 Steve Salevan 2008-05-27 19:35:37 UTC
I can repro this bug by following the test procedure on the latest build of 511.
 /root/ks-post.log reports:

Error Message:
    Conflicting base channels
Error Class Code: 63 
Error Class Info: Conflicting activation tokens
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

ERROR: unable to read system id.
ERROR: unable to read system id.

As thus, moving to FAILS_QA.

Comment 14 Justin Sherrill 2008-06-03 21:14:16 UTC
I'm gonna to clone this bug for provisioning (non-baremetal) and align with 5.3.

Comment 15 wes hayutin 2008-06-03 21:27:03 UTC
this passes with bare metal kickstarts, fails w/ standard kickstarts..

Comment 16 wes hayutin 2008-06-03 21:31:46 UTC
standard kickstart, meaning via the webui.. on a system w/ rhel... he he
verified buil3 

Comment 17 Jan Wildeboer 2008-06-19 14:30:11 UTC
Workaround I am using:

add rhnreg_ks with --force to %post.

That does the trick. So the first rhnreg_ks fails, but in %post it works. The
--force option did the trick.

Jan

Comment 19 Nick Strugnell 2008-07-02 13:03:02 UTC
Note that the workaround in #7 cannot be used when using the WebUI to deploy
VMs, as you don't get to specify any ks arguments.

You must instead use the workaround in #17.

I'm using:

rhnreg_ks --force --activationkey=1-3c4dfb3831e6a2bc9261d09c4ff06339

rhn_check
yum -y update
rhn_check

Comment 20 wes hayutin 2008-07-18 19:37:34 UTC
after running a related test.. 
I was able to reproduce this bug using base rhel 4 w/ no errata

Error Message:

    Conflicting base channels

Error Class Code: 63

Error Class Info: Conflicting activation tokens

Explanation: 

     An error has occurred while processing your request. If this problem

     persists please enter a bug report at bugzilla.redhat.com.

     If you choose to submit the bug report, please be sure to include

     details of what you were trying to do when this error occurred and

     details on how to reproduce this problem.



ERROR: unable to read system id.

ERROR: unable to read system id.

[root@fjs-0-18 ~]# 





I'm double checking a rhel 4 channel w/ full errata

Comment 21 wes hayutin 2008-07-18 19:58:33 UTC
same issue w/ full errata, however the customer only had issues w/ baremetal
kickstarts.. making sure we have a clone for 5.3.

Ok.. I verified this bug is fixed for bare metal kickstarts, so I'll clone it
for 5.3 moving back to verified.


Comment 22 wes hayutin 2008-07-18 20:01:22 UTC
cloned bug is https://bugzilla.redhat.com/show_bug.cgi?id=449846

Comment 23 Sayli Karmarkar 2008-07-23 16:11:58 UTC
validated

Comment 26 Brandon Perkins 2008-08-13 19:03:09 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.

Comment 27 Brandon Perkins 2008-08-13 19:08:22 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.