RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1840337 - by adding --expand to the 'boom show' command, it should display the value of the new grub option variable $grub_users
Summary: by adding --expand to the 'boom show' command, it should display the value of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.9
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-26 18:33 UTC by Corey Marthaler
Modified: 2021-09-03 12:40 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.187-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:55:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3927 0 None None None 2020-09-29 19:56:28 UTC

Description Corey Marthaler 2020-05-26 18:33:14 UTC
Description of problem:
[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


[root@harding-03 /]#  boom list -o+options
BootID  Version                  Name                            RootDevice             Options                                                   
507b4ff 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
ce879b5 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
43463f2 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
7d17f67 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
2824e9f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
aa58878 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
9dcc192 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
80d088c 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
d76e23f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
6178870 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap


# Nothing added w/ --expand

[root@harding-03 /]#  boom list -o+options --expand
BootID  Version                  Name                            RootDevice             Options                                                   
507b4ff 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
ce879b5 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
43463f2 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
7d17f67 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
2824e9f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
aa58878 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
9dcc192 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
80d088c 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
d76e23f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
6178870 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap


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 Corey Marthaler 2020-05-27 00:55:25 UTC
I assume --expand is short for --expand-variables, which also doesn't currently show the new grub values.


[root@harding-03 boom]# boom list -o+options --expand-variables
BootID  Version                  Name                            RootDevice             Options                                                   
507b4ff 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
ce879b5 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
43463f2 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
7d17f67 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
2824e9f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
aa58878 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
9dcc192 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
80d088c 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
d76e23f 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
6178870 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap

Comment 3 Corey Marthaler 2020-05-27 00:57:25 UTC
As a work around, "boom entry show" does provide the new values.

[root@harding-03 boom]# boom entry show aa58878
Boot Entry (boot_id=aa58878)
  title 7
  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 glarch
  grub_arg kernel
  grub_class --unrestricted

Comment 4 Bryn M. Reeves 2020-05-27 16:13:22 UTC
Yes: --expand is a shorthand for --expand-variables. It's intended behaviour is to show the expansion of bootloader variables in all output but it currently only applies correctly to reporting output and the "options" property of the BootEntry (which typically contains the two variables "$kernelopts $tunedopts" in system-managed boot entries). I'm testing a change which removes the restriction to only expand the "options" property and to honour the variable values in all keys where they can occur.

Comment 5 Bryn M. Reeves 2020-05-27 16:23:55 UTC
commit 644104d6552272a6d61e9fa37561d6070104f3b3 (HEAD -> master)
Author: Bryn M. Reeves <bmr>
Date:   Wed May 27 17:18:33 2020 +0100

    boom: allow expand for all BootEntry keys in BootEntry.__str()
    
    Initially bootloader variable expansion was limited to the options
    key of BootEntry options. The use of Grub2 bootloader variables
    has since expanded to the optional grub_* keys as well as the
    initramfs image key (and could potentially be used in others in
    future). Remove the special treatment of the options key and allow
    expansion of all BootEntry key values in string representations.
    
    Signed-off-by: Bryn M. Reeves <bmr>

Comment 8 Corey Marthaler 2020-06-08 21:40:19 UTC
After discussing the --expand change with Bryn today, this only affects the 'boom show' cmd and not others like 'boom list'. Changing the subject to reflect that.

Comment 9 Corey Marthaler 2020-06-09 01:03:46 UTC
Marking verified with the latest build.

 # old rpm lvm2-python-boom-1.1-1.el7.noarch

[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

[root@harding-03 ~]# boom entry show 6178870
Boot Entry (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

# Here $grub_users isn't expanded
[root@harding-03 ~]# boom entry show 6178870 --expand
Boot Entry (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




# new rpm lvm2-python-boom-1.2-1.el7.noarch
[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

[root@mckinley-01 ~]# boom entry show bfc60bb
Boot Entry (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

# Here $grub_users is expanded (even though it's not set to anything currently).
[root@mckinley-01 ~]# boom entry show bfc60bb --expand
Boot Entry (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_arg --unrestricted
  grub_class kernel

Comment 11 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


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