Bug 2184762

Summary: Incorrect boot_id when --add-opts is used (upgrades/rollback)
Product: Red Hat Enterprise Linux 7 Reporter: Bryn M. Reeves <bmr>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Other QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 7.8   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-20 14:33:40 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 Bryn M. Reeves 2023-04-05 16:09:41 UTC
Description of problem:
The version of boom packages in RHEL7 contains a bug in the handling of additional kernel command line options specified with --add-opts. This causes the boot_id of affected boot entries to change unexpectedly preventing boom from removing them with the "boom delete" command.

Version-Release number of selected component (if applicable):
lvm2-python-boom-1.2-2.el7_9.5.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a boot entry with multiple options specified with --add-opts:
[root@localhost ~]# boom create --title "AddOpts Test" --root-lv rhel/root --add-opts "a b c"
Created entry with boot_id c40fcac:
  title AddOpts Test
  machine-id 7d70d7fcc6884be19987956d0897da31
  version 3.10.0-1160.88.1.el7.x86_64
  linux /vmlinuz-3.10.0-1160.88.1.el7.x86_64
  initrd /initramfs-3.10.0-1160.88.1.el7.x86_64.img
  options root=/dev/rhel/root ro rd.lvm.lv=rhel/root a b c
  grub_users $grub_users
  grub_arg --unrestricted
  grub_class kernel

2. Inspect the boot_id reported by "boom list"
[root@localhost ~]# boom list
BootID  Version                     Name                            RootDevice    
098813e 3.10.0-1160.88.1.el7.x86_64 Red Hat Enterprise Linux Server /dev/rhel/root

3. Attempt to delete the entry via either reported boot_id:
[root@localhost ~]# boom delete c40fcac
No matching entry found.
[root@localhost ~]# boom delete 098813e
Entry does not exist: /boot/loader/entries/7d70d7fcc6884be19987956d0897da31-098813e-3.10.0-1160.88.1.el7.x86_64.conf

Actual results:
The entry boot_id reported when the entry is created does not match the value reported when the entry is read back in from disk and it is not possible to delete the entry with "boom delete".

Expected results:
The boot_id remains consistent and the entry can be removed with "boom delete".

Additional info:
Users can work around this problem my manually removing the problem boot entry from /boot/loader/entries with the rm command:

[root@localhost ~]# rm -f /boot/loader/entries/7d70d7fcc6884be19987956d0897da31-098813e-3.10.0-1160.88.1.el7.x86_64.conf