Bug 1840337
| Summary: | by adding --expand to the 'boom show' command, it should display the value of the new grub option variable $grub_users | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | 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:33:14 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 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 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. 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>
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. 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 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 |