Wrong processing kernel options without assignment in 'cobbler edit profile ... --in-place' command

Bug #1606285 reported by Albert Syriy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cobbler (Ubuntu)
New
Undecided
Unassigned

Bug Description

Editing a cobbler profile kernel options with the key --in-place for the kernel options without assignment (=value) follows to the adding assignment the '~' value.

For example:

Original kernel options (please put your attention to the 'toram' and 'debug' options):
-------------------------------------------------------------------------------
initrd=/images/ubuntu_bootstrap/initrd.img ksdevice=bootif console=ttyS0,9600 console=tty0 toram debug
-------------------------------------------------------------------------------

After executing the cobbler command
-------------------------------------------------------------------------------
cobbler profile edit --name ubuntu_bootstrap --kopts="console=tty0 console=ttyS0,115200 iommu=off" --in-place
-------------------------------------------------------------------------------

Will be mangled to (please put attention to the 'toram' and 'debug' options):
-------------------------------------------------------------------------------
initrd=/images/ubuntu_bootstrap/initrd.img ksdevice=bootif console=ttyS0,115200 console=tty0 iommu=off toram=~ debug=~
-------------------------------------------------------------------------------

Adding =~ to the toram changes the option from a flag downloading file system into the RAM to the name of the file-system file (with the name '~') and triggers kernel panic.

See the bug for the details
https://bugs.launchpad.net/mos/+bug/1603615

So kernel flags like debug, loglevel, toram and etc should not be mangled with the '=~' value.

Details about cobbler version:

# cobbler version
Cobbler 2.6.9
  source: ?, ?
  build time: Mon May 23 15:48:50 2016

IMHO the check of '~' in profile and removing (all '~') before saving new parameters should be add into the code lines:
https://github.com/cobbler/cobbler/blob/master/cobbler/remote.py#L994-L995

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.