Bug 1840333

Summary: new boom grub args are reversed (grub_arg and grub_class)
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Other QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: agk, bmr, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, zkabelac
Version: 7.9   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.187-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:55:48 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:

Description Corey Marthaler 2020-05-26 18:27:42 UTC
Description of problem:

The "normal" values for those keys (unless the user sets them) are:
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel


[root@harding-03 /]# boom create --title 9  --root-device /dev/snapper/boom_snap
Created entry with boot_id 6178870:
  title 9
  machine-id a41ec8c891a84179a7716bce7b6e893e
  version 3.10.0-1141.el7.x86_64
  linux /vmlinuz-3.10.0-1141.el7.x86_64
  initrd /initramfs-3.10.0-1141.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
  grub_users $grub_users
  grub_arg kernel
  grub_class --unrestricted


Version-Release number of selected component (if applicable):
[root@harding-03 /]# rpm -qi lvm2-python-boom-1.1-1.el7.noarch
Name        : lvm2-python-boom
Epoch       : 7
Version     : 1.1
Release     : 1.el7
Architecture: noarch
Install Date: Tue 19 May 2020 09:53:44 PM CDT
Group       : System Environment/Base
Size        : 1240817
License     : GPLv2
Signature   : (none)
Source RPM  : lvm2-2.02.187-3.el7.src.rpm
Build Date  : Tue 19 May 2020 06:07:15 AM CDT

Comment 2 Bryn M. Reeves 2020-05-27 15:00:16 UTC
This is a trivial fix for a silly bug: the values for the two keys are swapped in the OPTIONAL_KEYS_DEFAULTS map. Although this can be worked around via the command line --grub-class and --grub-arg arguments these are somewhat awkward to use in practice due to the need to escape special shell characters and GNU-style long option strings in the argument values: with the normal Red Hat Grub2 authentication scheme the default values are expected to be used by the vast majority of users so it would be great to get this fixed. The command line arguments are only present to allow users who implement their own bootloader authentication to override these values if needed.

commit d03049ea52b24c577fa98ee69cff522058fbb79e (HEAD -> master)
Author: Bryn M. Reeves <bmr>
Date:   Wed May 27 15:55:19 2020 +0100

    boom.bootloader: fix OPTIONAL_KEY_DEFAULTS values
    
    The default values for the optional keys BOOM_ENTRY_GRUB_ARG and
    BOOM_ENTRY_GRUB_CLASS are reveresed: switch them to the correct
    names.
    
    Signed-off-by: Bryn M. Reeves <bmr>

Comment 5 Corey Marthaler 2020-06-08 18:07:55 UTC
Fix verified in the latest rpms.

lvm2-python-boom-1.2-1.el7    BUILT: Sun Jun  7 08:15:48 CDT 2020

lvm2-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-libs-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-cluster-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-lockd-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-libs-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-event-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-event-libs-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-persistent-data-0.8.5-3.el7    BUILT: Mon Apr 20 09:49:16 CDT 2020


[root@mckinley-01 ~]# boom create --title 9  --root-device /dev/snapper/boom_snap
Created entry with boot_id bfc60bb:
  title 9
  machine-id 5f126ad40ec949e883e85dfe172f58f3
  version 3.10.0-1141.el7.x86_64
  linux /vmlinuz-3.10.0-1141.el7.x86_64
  initrd /initramfs-3.10.0-1141.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
  grub_users $grub_users
  grub_arg --unrestricted
  grub_class kernel

Comment 7 errata-xmlrpc 2020-09-29 19:55:48 UTC
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 (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3927