Bug 1848123
| Summary: | Support for --grub-users, --grub-arg, --grub-class, and --grub-id extensions supported by Red Hat Grub2 builds | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | boom-boot | Assignee: | LVM and device-mapper development team <lvm-team> |
| Status: | CLOSED DUPLICATE | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.3 | CC: | agk, bmr, jbrassow, mcsontos |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-07-15 15:06:49 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-06-17 17:43:19 UTC
For some reason the RHEL8 RPMs are not shipping any pre-defined profiles. I already filed bug 1842626 a couple of weeks ago to consolidate the two examples that were supposed to be shipped into a single profile for all RHEL8 versions so this should be addressed when that bug gets fixed. > Profile with os_id='1d60e6e' does not support None A profile needs to enable the list of optional keys that it supports (since they require support from the OS's Grub build). I don't know where this OsProfile ID comes from - it's not any of the ones that we've shipped (either in RHEL or upstream). "boom profile show 1d60e6e" will show how it was configured. The original RHEL8 update package (boom-1.2-1.el8) was supposed to contain two RHEL8 OsProfiles (8.1 and 8.2): Actual results: OsID Name OsVersion f44fb52 Red Hat Enterprise Linux 8.1 (Ootpa) 1ba0043 Red Hat Enterprise Linux 8.2 (Ootpa) After bug 1842626 is MODIFIED there should be a single one: OsID Name OsVersion 4abe4f7 Red Hat Enterprise Linux 8 (Ootpa) The use of optional keys like grub_arg, grub_users, grub_class is enabled on a per-profile basis: you should see an "Optional keys" field in the "boom profile show" output that lists the key names that that OS permits: # boom profile show OS Profile (os_id=4abe4f7) OS ID: "4abe4f7fd38fc7506cbe2f42b1b85d54af3b29b1", Name: "Red Hat Enterprise Linux", Short name: "rhel", Version: "8 (Ootpa)", Version ID: "8", 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} rhgb quiet", Title: "%{os_name} %{os_version_id} (%{version})", Optional keys: "grub_users grub_class grub_arg", UTS release pattern: "el8" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you're creating an OsProfile by hand (or using --from-host) then you need to specify these key names on the command line when creating the profile: # boom profile create --from-host --optional-keys "grub_users grub_class grub_arg" Created profile with os_id f44fb52: OS ID: "f44fb528ff8360ad67e2fe0274750b838da0bd6a", Name: "Red Hat Enterprise Linux", Short name: "rhel", Version: "8.1 (Ootpa)", Version ID: "8.1", 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_users grub_class grub_arg", UTS release pattern: "el8" If you have an existing OsProfile that lacks the optional keys setting you can enable them with: # boom profile create --from-host Created profile with os_id f44fb52: OS ID: "f44fb528ff8360ad67e2fe0274750b838da0bd6a", Name: "Red Hat Enterprise Linux", Short name: "rhel", Version: "8.1 (Ootpa)", Version ID: "8.1", 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: "", UTS release pattern: "el8" # boom profile edit f44fb52 --optional-keys "grub_users grub_class grub_arg" Edited profile: OS ID: "f44fb528ff8360ad67e2fe0274750b838da0bd6a", Name: "Red Hat Enterprise Linux", Short name: "rhel", Version: "8.1 (Ootpa)", Version ID: "8.1", 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_users grub_class grub_arg", UTS release pattern: "el8" The keys will then be automatically added to any new BootEntry created with this profile: # boom create --title "optional keys test" --rootlv rhel/root Created entry with boot_id f99d5e0: title optional keys test machine-id b49e623f993c4fd7b200c5e350f9cacc version 4.18.0-167.el8.x86_64 linux /vmlinuz-4.18.0-167.el8.x86_64 initrd /initramfs-4.18.0-167.el8.x86_64.img options root=/dev/rhel/root ro rd.lvm.lv=rhel/root rhgb quiet grub_users $grub_users grub_arg kernel grub_class --unrestricted For the very rare case that the defaults are not correct values can be specified on the command line: # boom create --title "optional keys test2" --rootlv rhel/root --grub-users foo --grub-arg bar --grub-class baz Created entry with boot_id 73cc7fe: title optional keys test2 machine-id b49e623f993c4fd7b200c5e350f9cacc version 4.18.0-167.el8.x86_64 linux /vmlinuz-4.18.0-167.el8.x86_64 initrd /initramfs-4.18.0-167.el8.x86_64.img options root=/dev/rhel/root ro rd.lvm.lv=rhel/root rhgb quiet grub_users foo grub_arg bar grub_class baz But this is only permitted if the corresponding OsProfile allows the optional keys specified. There's a minor/cosmetic bug in the output you post above: # boom create --title 11 --grub-user root --root-lv /dev/snapper/boom_snap WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom' Profile with os_id='1d60e6e' does not support None <<<---------- ERROR - Command failed: OsProfile os_id=1d60e6e does not allow 'grub_users' The first error message is broken - "None" should be the command line argument that was invalid (--grub-users): we should fix this so there is only a single, correct error message in this case. It's also possible for us to enhance this in future to automatically enable those optional keys for all Red Hat distros (since we know they are supported - we already have a heuristic for setting the uname pattern in this case). I think this should be fixed in the current build - updating my test environment to verify now. Verified that the optional keys are enabled by default in the built-in RHEL8 profile in boom-boot-1.2-2.el8:
# rpm -q boom-boot
boom-boot-1.2-2.el8.noarch
# boom profile list
OsID Name OsVersion
8896596 Fedora 30 (Workstation Edition)
4abe4f7 Red Hat Enterprise Linux 8 (Ootpa)
72e3679 Red Hat Enterprise Linux Server 7.7 (Maipo)
4aff687 Red Hat Enterprise Linux Server 7.8 (Maipo)
# boom profile show 4abe
OS Profile (os_id=4abe4f7)
OS ID: "4abe4f7fd38fc7506cbe2f42b1b85d54af3b29b1",
Name: "Red Hat Enterprise Linux", Short name: "rhel",
Version: "8 (Ootpa)", Version ID: "8",
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} rhgb quiet",
Title: "%{os_name} %{os_version_id} (%{version})",
Optional keys: "grub_users grub_class grub_arg", UTS release pattern: "el8"
# boom create --title "Optional Keys Test" --rootlv rhel/root
Created entry with boot_id 01a7b91:
title Optional Keys Test
machine-id b49e623f993c4fd7b200c5e350f9cacc
version 4.18.0-167.el8.x86_64
linux /vmlinuz-4.18.0-167.el8.x86_64
initrd /initramfs-4.18.0-167.el8.x86_64.img
options root=/dev/rhel/root ro rd.lvm.lv=rhel/root rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
Marking this as a duplicate of bug 1842626 which caused the behaviour shown in comment #0.
*** This bug has been marked as a duplicate of bug 1842626 ***
|