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 2096368 - Support for --grub-users, --grub-arg, --grub-class no longer exists in rhel9.1
Summary: Support for --grub-users, --grub-arg, --grub-class no longer exists in rhel9.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: boom-boot
Version: 9.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-13 16:10 UTC by Corey Marthaler
Modified: 2022-11-15 11:43 UTC (History)
5 users (show)

Fixed In Version: boom-boot-1.4-4.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:36:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github snapshotmanager boom issues 9 0 None open Users of distributions that support grub_* optional keys need to enable them manually 2022-06-13 16:56:40 UTC
Red Hat Issue Tracker RHELPLAN-125129 0 None None None 2022-06-13 16:17:23 UTC
Red Hat Product Errata RHBA-2022:8205 0 None None None 2022-11-15 10:36:26 UTC

Description Corey Marthaler 2022-06-13 16:10:43 UTC
Description of problem:
The following options were added and tested starting in rhel8.3, I believe as a part of Bug 1848123. They no longer work in rhel9.1. Is this expected? 

The rhel9.1 boom rebase bug mentions:
"Other notable changes are:

- removing of boom-boot-grub2 subpackage, which is now obsolete. With BLS the default, it is not needed anymore"

Is this what that comment is describing?


[root@hayes-02 ~]# lvs -a -o +devices,segtype
  LV        VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       Type
  boom_snap snapper swi-a-s--- 100.00m      origin 0.00                                    /dev/sdg1(75) linear
  origin    snapper owi-a-s--- 300.00m                                                     /dev/sdg1(0)  linear

[root@hayes-02 ~]# boom create --title 10 --grub-arg 172 --root-lv /dev/snapper/boom_snap
Profile with os_id='9a774ee' does not support --grub-arg
ERROR - Command failed: OsProfile os_id=9a774ee does not allow 'grub_arg'
[root@hayes-02 ~]# boom create --title 10 --grub-class 439 --root-lv /dev/snapper/boom_snap
Profile with os_id='9a774ee' does not support --grub-class
ERROR - Command failed: OsProfile os_id=9a774ee does not allow 'grub_class'
[root@hayes-02 ~]# boom create --title 10 --grub-users 511 --root-lv /dev/snapper/boom_snap
Profile with os_id='9a774ee' does not support --grub-users
ERROR - Command failed: OsProfile os_id=9a774ee does not allow 'grub_users'


Version-Release number of selected component (if applicable):
boom-boot-1.4-3.el9    BUILT: Tue May 24 12:25:26 PM CDT 2022

Comment 1 Bryn M. Reeves 2022-06-13 16:30:40 UTC
> removing of boom-boot-grub2 subpackage, which is now obsolete. With BLS the default, it is not needed anymore"

No - this subpackage contained shell scripts that hooked into grub2-mkconfig to enable BLS and optionally allow a submenu to be used on releases that supported it (RHEL7). Since BLS is now enabled by default we don't need to ship those scripts or tell users to modify the Grub configuration in order to use boom.

> They no longer work in rhel9.1. Is this expected? 

They are there, and they do work, but the user now needs to enable them manually. This is not ideal - it's a consequence of the fact that we are no longer shipping "canned" profiles in the RHEL package that include the Red Hat-specific profile tweaks. This fact had slipped my mind when I updated bug 2089418 earlier (we have a heuristic to automatically set the --uname-pattern for RHEL and Fedora, and I think I incorrectly thought that we had covered this with a similar mechanism).

# boom profile create --from-host --optional-keys "grub_arg grub_users grub_class"
Created profile with os_id e0ef3eb:
  OS ID: "e0ef3ebf3862de64e4082062f0063422796dcca6",
  Name: "Red Hat Enterprise Linux", Short name: "rhel",
  Version: "9.0 (Plow)", Version ID: "9.0",
  Kernel pattern: "/vmlinuz-%{version}", Initramfs pattern: "/initramfs-%{version}.img",
  Root options (LVM2): "rd.lvm.lv=%{lvm_root_lv}",
  Root options (BTRFS): "rootflags=%{btrfs_subvolume}",
  Options: "root=%{root_device} ro %{root_opts}",
  Title: "%{os_name} %{os_version_id} (%{version})",
  Optional keys: "grub_arg grub_users grub_class", UTS release pattern: "el9"

# boom create --title "Boom Grub Optional Keys Test" --grub-users "foo bar" --root-lv rhel/root
Created entry with boot_id 3b7bb70:
  title Boom Grub Optional Keys Test
  machine-id 68f613d8774e41e792fad28212cfedae
  version 5.14.0-70.13.1.el9_0.x86_64
  linux /vmlinuz-5.14.0-70.13.1.el9_0.x86_64
  initrd /initramfs-5.14.0-70.13.1.el9_0.x86_64.img
  options root=/dev/rhel/root ro rd.lvm.lv=rhel/root
  grub_users foo bar
  grub_arg --unrestricted
  grub_class kernel

I can extend the --from-host heuristics to also handle this case; I don't think it's reasonable to expect users to be familiar with the quirks of Red Hat's extensions to the BLS spec and it's a lot of additional typing. Otherwise we'd need to document this for users who need to be able to configure the grub extension keys.

Comment 2 Bryn M. Reeves 2022-06-14 13:35:26 UTC
OK. I wasn't mis-remembering - we do have an existing mechanism to handle this. It was added in 2019 for boom-1.0 (RHEL7).

commit cd4794f130c883ccf27d8779628ab2f3f5a25d3b
Author: Bryn M. Reeves <bmr>
Date:   Tue Nov 26 21:04:09 2019 +0000

    boom.command: automatically set default optional_keys
    
    All distributions in the Red Hat "family" (Fedora, CentOS and
    Red Hat Enterprise Linux, as well as rebuilds/forks) are known
    to support the additional Red Hat-defined BLS keys. Automatically
    enable these keys when a corresponding OsProfile is created unless
    the user specifies an explicit value with --optional-keys.
    
    Signed-off-by: Bryn M. Reeves <bmr>

The table includes the RHEL7 "Server" and "Workstation" string variants, but was not updated when RHEL8 dropped these suffixes. This was not detected previously because we shipped built-in profiles for RHEL8.

This has now been fixed and also extends the automatic optional keys coverage to F35+ (which switched the NAME field from "Fedora" to "Fedora Linux"):

commit 514f3f014815c2bfe8d4a5a325c54ea34fb9cb4f (HEAD -> main)
Author: Bryn M. Reeves <bmr>
Date:   Tue Jun 14 09:31:33 2022 -0400

    boom.command: add new os-release values to Red Hat optional keys list
    
    Add "Red Hat Enterprise Linux" (NAME for el8 onwards), and "Fedora
    Linux" (NAME for fc35 onwards) to the table of names to automatically
    enable grub optional keys for.
    
    Signed-off-by: Bryn M. Reeves <bmr>

diff --git a/boom/command.py b/boom/command.py
index 0ef66ee..07c0616 100644
--- a/boom/command.py
+++ b/boom/command.py
@@ -1094,9 +1094,11 @@ def _default_optional_keys(osp):
     """
     all_optional_keys = "grub_users grub_arg grub_class id"
     _default_optional_keys = [
+        "Red Hat Enterprise Linux",
         "Red Hat Enterprise Linux Server",
         "Red Hat Enterprise Linux Workstation",
         "CentOS Linux",
+        "Fedora Linux",
         "Fedora"
     ]
     if osp.os_name in _default_optional_keys:

Comment 4 Corey Marthaler 2022-07-19 16:20:30 UTC
Appears to be working now. Marking verified in the latest rpm.

boom-boot-1.4-4.el9    BUILT: Thu Jul 14 01:20:05 AM CDT 2022


[root@hayes-03 ~]# boom create --title 10 --grub-arg 172 --root-lv /dev/snapper/boom_snap
Created entry with boot_id 366f282:
  title 10
  machine-id f59e551c77ff4b96901e02e6392ad713
  version 5.14.0-127.el9.x86_64
  linux /vmlinuz-5.14.0-127.el9.x86_64
  initrd /initramfs-5.14.0-127.el9.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
  grub_users $grub_users
  grub_arg 172
  grub_class kernel
[root@hayes-03 ~]# boom create --title 10 --grub-class 439 --root-lv /dev/snapper/boom_snap
Created entry with boot_id 3b36472:
  title 10
  machine-id f59e551c77ff4b96901e02e6392ad713
  version 5.14.0-127.el9.x86_64
  linux /vmlinuz-5.14.0-127.el9.x86_64
  initrd /initramfs-5.14.0-127.el9.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 439
[root@hayes-03 ~]# boom create --title 10 --grub-users 511 --root-lv /dev/snapper/boom_snap
Created entry with boot_id 6a8433b:
  title 10
  machine-id f59e551c77ff4b96901e02e6392ad713
  version 5.14.0-127.el9.x86_64
  linux /vmlinuz-5.14.0-127.el9.x86_64
  initrd /initramfs-5.14.0-127.el9.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap
  grub_users 511
  grub_arg --unrestricted
  grub_class kernel

Comment 8 errata-xmlrpc 2022-11-15 10:36:23 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 (boom-boot 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-2022:8205


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