Bug 816445

Summary: Registration fails on kickstart process due a code error in redhat_register snippet
Product: [Community] Spacewalk Reporter: Marcelo Moreira de Mello <mmello>
Component: ServerAssignee: Marcelo Moreira de Mello <mmello>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.7CC: jpazdziora, mmello
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-java-1.8.55-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-01 16:21:43 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: 871344    
Attachments:
Description Flags
Patch proposed none

Description Marcelo Moreira de Mello 2012-04-26 05:21:17 UTC
Description of problem:

Registration process when kickstarting a box is falling due a code error in redhat_register snippet


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


How reproducible:
100%


Steps to Reproduce:
1. Create an activation key
2. Associate with a kickstart profile
3. Kickstart the box
  
Actual results:

 Registration will fail

if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ]
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
fi

Expected results:

  Registration occurs normally


Additional info:

Comment 1 Marcelo Moreira de Mello 2012-04-26 05:26:09 UTC
  Executing the script manually after kickstart the box

bash -x /tmp/ks-script-hIABqo

{..SNIP..}

+ perl -npe s/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g -i /etc/sysconfig/rhn/allowed-actions /etc/sysconfig/rhn/clientCaps.d /etc/sysconfig/rhn/osad-auth.conf /etc/sysconfig/rhn/osad.conf /etc/sysconfig/rhn/rhnsd /etc/sysconfig/rhn/up2date
Can't do inplace edit: /etc/sysconfig/rhn/allowed-actions is not a regular file.
Can't do inplace edit: /etc/sysconfig/rhn/clientCaps.d is not a regular file.
ks-script-hIABqo: line 272: syntax error near unexpected token `fi'
ks-script-hIABqo: line 272: `fi'

Comment 2 Marcelo Moreira de Mello 2012-04-26 05:29:17 UTC
Created attachment 580352 [details]
Patch proposed


 Patch already submitted to approval on spacewalk-devel mailing list. 

Best, 
mmello

Comment 3 Marcelo Moreira de Mello 2012-04-26 05:29:54 UTC

 Mail thread --> https://www.redhat.com/archives/spacewalk-devel/2012-April/msg00081.html

Comment 4 Jan Pazdziora 2012-04-26 07:33:48 UTC
Committed to Spacewalk master, 1e417be3c38abb1f9d5768b5124079a44402e2f1.

Comment 5 Jan Pazdziora 2012-10-30 19:25:52 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 6 Jan Pazdziora 2012-11-01 16:21:43 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18