Bug 664724

Summary: kickstart snippet keep_system_id does not work
Product: Red Hat Satellite 5 Reporter: Tasos Papaioannou <tpapaioa>
Component: ProvisioningAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Jan Hutař <jhutar>
Severity: medium Docs Contact:
Priority: low    
Version: 540CC: cperry, jhutar, mmello, shardy, stephan.duehr, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause kickstart snippet typo Consequence Kickstart snippet keep_system_id didn't work Result keep_system_id shall work in kickstart profiles like expected
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-17 14:13:17 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: 646488    

Description Tasos Papaioannou 2010-12-21 13:46:07 UTC
Description of problem:

The kickstart setting "Re-connect to the existing system profile. Do not create a new system profile." does not work. Kickstarting an already-registered system results in a new system profile on the Satellite.


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

spacewalk-java-1.2.39-29.el5sat

How reproducible:

100%

Steps to Reproduce:
1. Create a kickstart profile with the following setting:
System Details > Details > "Re-connect to the existing system profile. Do not create a new system profile."

2. Kickstart a new system, using this kickstart profile.

3. Kickstart the system again, using the same kickstart profile.

  
Actual results:

A new system profile is created during the second kickstart.

Expected results:

The first system profile should be re-used during the second kickstart.

Additional info:

A bash scripting error in the snippet keep_system_id appears to be the problem. The following one-line change to /var/lib/rhn/kickstarts/snippets/keep_system_id resolved the issue in my testing:

# diff -pruN keep_system_id.orig keep_system_id
--- keep_system_id.orig	2010-10-12 15:37:45.000000000 -0400
+++ keep_system_id	2010-12-20 17:39:49.000000000 -0500
@@ -7,7 +7,7 @@ rhn_keys_found=no
 insmod /lib/jbd.o
 insmod /lib/ext3.o
 
-if [ -f /lib/ext4.o ];
+if [ -f /lib/ext4.o ]; then
     insmod /lib/ext4.o
 fi

Comment 1 Tomas Lestach 2010-12-22 10:20:03 UTC
This was fixed in
spacewalk.git: bb3183abcf9d69bba1092d8104c456b2e3e996f7

Comment 2 Stephan Dühr 2011-01-10 14:23:43 UTC
The kickstart setting "Delete the existing system profile and create a new system profile." does not work either, it also depends on the snippet keep_system_id.

Comment 6 Tomas Lestach 2011-02-14 17:14:14 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
kickstart snippet typo

Consequence
Kickstart snippet keep_system_id didn't work

Result
keep_system_id shall work in kickstart profiles like expected

Comment 8 Tomas Lestach 2011-03-11 08:40:15 UTC
*** Bug 684102 has been marked as a duplicate of this bug. ***

Comment 11 Marcelo Moreira de Mello 2011-03-11 20:46:42 UTC
Thanks Cliff

Comment 12 errata-xmlrpc 2011-03-17 14:13:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0362.html