Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1974885

Summary: how do you use the latest 8.5 OS profile (f9e44dd)
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: boom-bootAssignee: Bryn M. Reeves <bmr>
Status: CLOSED WONTFIX QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.5CC: agk, bmr, jbrassow, mcsontos
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: ---   
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: 2022-12-22 07:27:59 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 2021-06-22 17:40:45 UTC
Description of problem:
If I create a OS profile for the running 8.5 OS, why isn't that the default used when creating boom entries? And if it's not the default how do I use it? Also, what do the "--os-release" and "-n OSNAME" even do if they don't tell boom create what OS to use?

[root@hayes-02 ~]# boom profile create --from-host --uname-pattern el8
Created profile with os_id f9e44dd:
  OS ID: "f9e44ddcd6eb152aa7f461b185cc22e2f21465bb",
  Name: "Red Hat Enterprise Linux", Short name: "rhel",
  Version: "8.5 (Ootpa)", Version ID: "8.5",
  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"

[root@hayes-02 ~]# boom profile create --from-host --uname-pattern el8.5
Created profile with os_id f9e44dd:
  OS ID: "f9e44ddcd6eb152aa7f461b185cc22e2f21465bb",
  Name: "Red Hat Enterprise Linux", Short name: "rhel",
  Version: "8.5 (Ootpa)", Version ID: "8.5",
  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.5"

[root@hayes-02 ~]# boom profile list
OsID    Name                            OsVersion               
8896596 Fedora                          30 (Workstation Edition)
4abe4f7 Red Hat Enterprise Linux        8 (Ootpa)               
f9e44dd Red Hat Enterprise Linux        8.5 (Ootpa)             
72e3679 Red Hat Enterprise Linux Server 7.7 (Maipo)             
4aff687 Red Hat Enterprise Linux Server 7.8 (Maipo)             

# Enable use grub_id:
[root@hayes-02 ~]# boom profile edit f9e44dd --optional-keys 'grub_users grub_class grub_arg id'
Edited profile:
  OS ID: "f9e44ddcd6eb152aa7f461b185cc22e2f21465bb",
  Name: "Red Hat Enterprise Linux", Short name: "rhel",
  Version: "8.5 (Ootpa)", Version ID: "8.5",
  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 id", UTS release pattern: "el8.5"


[root@hayes-02 ~]# boom create --title 13 --grub-id 803 --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Profile with os_id='4abe4f7' does not support --grub-id
ERROR - Command failed: OsProfile os_id=4abe4f7 does not allow 'id'

# attempt w/ -n
[root@hayes-02 ~]#  boom create --title 13 --grub-id 803 -n 8.5  --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Profile with os_id='4abe4f7' does not support --grub-id
ERROR - Command failed: OsProfile os_id=4abe4f7 does not allow 'id'

# attempt w/ -n
[root@hayes-02 ~]#  boom create --title 13 --grub-id 803 -n el8.5  --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Profile with os_id='4abe4f7' does not support --grub-id
ERROR - Command failed: OsProfile os_id=4abe4f7 does not allow 'id'

# attempt w/ --os-version
[root@hayes-02 ~]# boom create --title 13 --grub-id 803 --os-version 8.5  --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Profile with os_id='4abe4f7' does not support --grub-id
ERROR - Command failed: OsProfile os_id=4abe4f7 does not allow 'id'

# attempt w/ --os-version
[root@hayes-02 ~]# boom create --title 13 --grub-id 803 --os-version el8.5  --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Profile with os_id='4abe4f7' does not support --grub-id
ERROR - Command failed: OsProfile os_id=4abe4f7 does not allow 'id'




# if I enable id w/ the os_id='4abe4f7', then this works, but that's not the profile I want to use
[root@hayes-02 ~]# boom profile edit 4abe4f7 --optional-keys 'grub_users grub_class grub_arg id'
Edited profile:
  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 id", UTS release pattern: "el8"
[root@hayes-02 ~]# boom create --title 13 --grub-id 803  --root-lv /dev/snapper/boom_snap
WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
Created entry with boot_id 2529774:
  title 13
  machine-id f36d7b1a5c0b40099f51de39a57d6e66
  version 4.18.0-310.el8.x86_64
  linux /vmlinuz-4.18.0-310.el8.x86_64
  initrd /initramfs-4.18.0-310.el8.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet
  id 803
  grub_users $grub_users
  grub_arg --unrestricted
  grub_class kernel


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Bryn M. Reeves 2021-06-23 12:14:09 UTC
> If I create a OS profile for the running 8.5 OS, why isn't that the default used when creating boom entries?

There isn't really a "default" OsProfile in boom - when creating a new entry we try to match the kernel version for the entry to a known OsProfile (using the profile's uname_pattern key, which is a regex that matches a corresponding kernel version string).

This works well for distinguishing between major releases (el7 vs el8) but it does not work well for minor releases due to the release string conventions for RHEL packages. For e.g. we cannot tell a y-stream update for 8.3 apart from 8.4 as they both use "el8" for the release string until the older release becomes a z-stream. It is only at that point that the rhel8.3 package updates start to use the "el8_3" release string.

This is the reason that we decided to consolidate on a single RHEL8 OsProfile in bug 1842626. 

With the consolidated rhel8 OsProfile shipped for bug 1842626 there should be no need for the user to create an OsProfile for rhel8 - they should just use the shipped version (os_id=4abe4f7), editing it for any kernel option template or other customisation needed.

Users who need to be able to have more than one rhel8 template can either user --profile to select one explicitly when running "boom create", or they can set up host profiles for the different RHEL installations they want to manage.

> if it's not the default how do I use it?

If you don't want to use the automatic uname matching you can set the profile explicitly with --profile, so to use your rhel-8.5 profile:

# boom create --profile f9e ...

(or any unique prefix of the required os_id).

You can also accomplish the same thing persistently by creating a host profile (but host profiles are mainly intended as an advanced feature for users managing multiple parallel installations).

> Also, what do the "--os-release" and "-n OSNAME" even do if they don't tell boom create what OS to use?

They are used as input to "boom profile create" or "boom profile edit" to set the OS name and release fields. Names and releases are not required to be unique (since you can have multiple "Red Hat Enterprise Linux" instances, or multiple operating systems with a release of "4").

Using "boom profile create --from-host" is a short cut that obtains these values from the fields of /etc/os-release so that you don't need to type out long commands like:

# boom profile create --name "Red Hat Enterprise Linux" --short-name "rhel" --os-version "8 (Ootpa)" --os-release "8" ...

But the command line options exist so that these values can be overridden or edited.

Comment 9 RHEL Program Management 2022-12-22 07:27:59 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.