Bug 886609 - koan: support for initramfs embeding of ks.cfg on RHEL-7
Summary: koan: support for initramfs embeding of ks.cfg on RHEL-7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: sat560-blockers sat560-rhel7
TreeView+ depends on / blocked
 
Reported: 2012-12-12 16:42 UTC by Milan Zázrivec
Modified: 2013-10-01 21:27 UTC (History)
2 users (show)

Fixed In Version: cobbler-2.0.7-34
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-01 21:27:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for cobbler-2.0.7-15 (1.05 KB, patch)
2012-12-12 16:43 UTC, Milan Zázrivec
no flags Details | Diff

Description Milan Zázrivec 2012-12-12 16:42:55 UTC
Description of problem:
This bug report is to make sure koan for RHEL-7, as distributed in RHN Tools
channels will be able to properly embed kickstart file into initramfs for
system re-provisioning.

This is needed for static networking provisioning.

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

How reproducible:
Always

Steps to Reproduce:
1. Reprovision a RHEL-7 system using static networking
2. Check whether the initramfs used contains ks.cfg (kickstart file)
  
Actual results:
initramfs does not contain ks.cfg

Expected results:
initramfs contains ks.cfg

Additional info:
N/A

Comment 1 Milan Zázrivec 2012-12-12 16:43:41 UTC
Created attachment 662483 [details]
Patch for cobbler-2.0.7-15

Comment 4 Lukas Pramuk 2013-09-25 15:27:09 UTC
VERIFIED. cobbler-2.0.7-37.el5sat

Reproducer:

1.) reprovision any client using RHEL7 ks tree 

@webui: Provisioning - Kickstart - Schedule - click Advanced Configuration, set Network Connection: (o) Use static interface {eth0}
click Schedule Kickstart and Finish and Confirm

@client 
# rhn_check -vv
...
D: do_call kickstart.initiate('<sat>', 'spacewalk-koan', ' ksdevice=eth0 ', 'eth0', '<client>:1', []){'cache_only': None}
initiating spacewalkkoan kickstart
Preserve files! : []
- looking for Cobbler at http://<sat>/cobbler_api
- reading URL: http://<sat>/cblr/svc/op/ks/system/<client>:1
install_tree: http://<sat>/ty/rPywiMvx
downloading initrd initrd.img to /boot/initrd.img
url=http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/initrd.img
- reading URL: http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz
url=http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/vmlinuz
- reading URL: http://<sat>/cobbler/images/server-x86_64-7-distro:1:RedHatSatTeam/vmlinuz
- reading URL: http://<sat>/cblr/svc/op/ks/system/<client>:1
- ['/bin/bash', '/var/spool/koan/insert.sh']
mount failed; treating initrd as a cpio archive...
193033 blocks
193067 blocks
...done
- ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz', '--initrd', '/boot/initrd.img', '--args', '"ks=file:ks.cfg ksdevice=eth0 kssendmac lang= text "', '--make-default', '--title=kick1380120305']
- reboot to apply changes
D: Sending back response(0, 'Kickstart initiate succeeded', {})
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 13}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1380120309.19 with expiration of 1380123909.19 seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1380120309.05', 'X-RHN-Auth': 'KY1j8+vkxwOpZItj44VzTg==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-6', '20130918221710', '1', '1'], ['rhn-tools-rhel-x86_64-server-6', '20130919063532', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 13}
D: handle_action actionid = 13, version = 2
D: do_call reboot.reboot(){'cache_only': None}
Rebooting the system now
...

2.) pause for a while the provisioning process and check reforged initramdisk file for ks.cfg file presence

# killall -9 shutdown
# cd `mktemp -d`
# gzip -d < /boot/initrd.img | cpio -id
# find -name ks.cfg
./ks.cfg
./tmp/ks.cfg

# reboot

3.) check RHEL7 anaconda proceeds with automated install successfully


note: the initramdisk was originally compressed using XZ compression, after ksfile insertion initramdisk was compressed using GZIP

Comment 5 Clifford Perry 2013-10-01 21:27:48 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

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/RHEA-2013-1395.html


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