Bug 445838 - 'Log custom post scripts' triggers a problem in kickstart post section can generate invalid files
Summary: 'Log custom post scripts' triggers a problem in kickstart post section can ge...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning
Version: 510
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Steve Salevan
URL:
Whiteboard:
Depends On:
Blocks: 429319
TreeView+ depends on / blocked
 
Reported: 2008-05-09 10:56 UTC by Issue Tracker
Modified: 2018-10-19 21:03 UTC (History)
2 users (show)

Fixed In Version: sat511
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-13 19:03:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Issue Tracker 2008-05-09 10:56:10 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2008-05-09 10:56:11 UTC
Description of problem:
Kicktarts are generated 'on request' by the RHN Satellite. A new feature of RHN Satellite 5.1 is a 'Log custom post scripts' where you can log custom post scripts. When this feature is enabled, an entry is added to the post section of the kickstart to redirect logs to /root/ks-post.log . 

The problem is intermittant approximately every second time the kickstart is accessed an extra line is placed in the kickstart file, causing a syntax error for the anaconda installer.



How reproducible:
50%  

Steps to Reproduce:

Install RHN Satellite 5.1. 
Populate the usual channels as required
Create a kickstart with the feature Log custom post scripts:   check box CHECKED.	

kickstart a system using the new kickstart. About every second attempt anaconda will error out at the post script stage.

An easy way to observe the problem and it's cause is to visit the download link :
https://dhcp-1-83.bne.redhat.com/kickstart/ks/org/1xa2622a09a74b2e07ff4dc0ffabe01138/view_label/ws1ws11


Actual results:

At the end of the kickstart file , about 50% of the time you will see the following:

%post --interpreter /bin/bash
(
/bin/ls > /tmp/ls.out
) >> /root/ks-post.log 2>&1
) >> /root/ks-post.log 2>&1

Notice the replicated line at the end. This is a script syntax error for anaconda installer.




Expected results:
End of the kickstart file should have a single line added for the script logging every time the kickstart file is accessd and generated by the RHN Satellite:

%post --interpreter /bin/bash
(
/bin/ls > /tmp/ls.out
) >> /root/ks-post.log 2>&1

Additional info:
satellite-debug for the RHN Satellite in question is attached

This event sent from IssueTracker by mpoole  [SEG - RHN]
 issue 179369

Comment 2 Martin Poole 2008-05-09 11:05:03 UTC
I did 100 fetches of the kickstart mentioned. There was a duplicate redirect
line in almost 25% of them.

Comment 4 Justin Sherrill 2008-05-09 18:17:37 UTC
weird, seems to have to do with a %post being a nochroot script....

Comment 5 Justin Sherrill 2008-05-09 19:24:08 UTC
fixed in rev 172368 for trunk and rev 172369.

Comment 7 Steve Salevan 2008-06-16 19:13:48 UTC
After wgetting 10 ks cfg files repeatedly for both chroot and nonchroot logged
post scripts I cannot reproduce the issue, so it looks like we're fixed here. 
Moving to VERIFIED.

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

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


Note You need to log in before you can comment on or make changes to this bug.