Bug 789487

Summary: bootloader --append= doesn't work for multiple args
Product: Red Hat Enterprise Linux 6 Reporter: Chris Lumens <clumens>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: jstodola
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-28 13:47:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Lumens 2012-02-10 21:14:37 UTC
If you provide a kickstart with something like:

bootloader --append="arg1 arg2"

then only the first argument makes it into the bootloader config.  I think the following (untested) patch should fix this problem:

diff --git a/kickstart.py b/kickstart.py
index de2dbe9..b33399f 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -43,6 +43,7 @@ import urlgrabber
 import warnings
 import network
 import upgrade
+import shlex
 import pykickstart.commands as commands
 from storage.devices import *
 from scdate.core import zonetab
@@ -278,7 +279,8 @@ class Bootloader(commands.bootloader.RHEL6_Bootloader):
             anaconda.id.ksdata.showSteps.append("bootloader")
             
             if self.appendLine:
-                anaconda.id.bootloader.args.append(self.appendLine)
+                for arg in shlex.split(self.appendLine):
+                    anaconda.id.bootloader.args.append(arg)
             
             if self.password:
                 anaconda.id.bootloader.setPassword(self.password, isCrypted = self.isCrypted)

Comment 1 RHEL Program Management 2012-02-10 21:20:03 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 2 David Cantrell 2012-02-13 14:02:45 UTC
Jan,

This is one we ran across working on 6.3 bugs and would like to include the fix in 6.3.  If you agree, can you set qa_ack+

Comment 3 Jan Stodola 2012-02-13 15:04:35 UTC
I'm trying to reproduce with following kickstart file:

bootloader --append="arg1 arg2"

%packages
@core

Both arguments are included on the kernel command line after reboot:
[root@rtt6 ~]# cat /proc/cmdline 
root=/dev/mapper/vg_rtt6-lv_root rd_DASD=0.0.3126 rd_DASD=0.0.3726 LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_rtt6/lv_swap  KEYTABLE=us rd_NO_LUKS rd_DASD=0.0.3526 SYSFONT=latarcyrheb-sun16 rd_DASD=0.0.3326 crashkernel=auto rd_DASD=0.0.3161 rd_LVM_LV=vg_rtt6/lv_root rd_DASD=0.0.3160 rd_DASD=0.0.3626 rd_DASD=0.0.3426 arg1 arg2 rd_DASD=0.0.3226 rd_NO_DM rd_DASD=0.0.3026 BOOT_IMAGE=0

Also available in /root/anaconda-ks.cfg:
[root@rtt6 ~]# grep bootloader /root/anaconda-ks.cfg 
bootloader --location=mbr --driveorder=dasdb,dasdc,dasdd,dasde,dasdf,dasdg,dasdh,dasdi,dasdj,dasdk --append="crashkernel=auto arg1 arg2"

Tested on s390x (RHEL-6.3 nightly, anaconda-13.21.151-1.el6) and x86_64 (RHEL-6.2, anaconda-13.21.149-1.el6), works fine on both.

Chris, any help with reproducing this issue?

Comment 4 David Cantrell 2012-02-28 13:47:10 UTC
Strange.  Well, if you can't reproduce it, I'm inclined to call this not a bug.