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 1528018 - boom traceback from incomplete boot entry creation
Summary: boom traceback from incomplete boot entry creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Marian Csontos
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-20 19:01 UTC by Corey Marthaler
Modified: 2021-09-03 12:41 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.177-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:23:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 0 None None None 2018-04-10 15:24:41 UTC

Description Corey Marthaler 2017-12-20 19:01:05 UTC
Description of problem:

I assume more of the options below should have been filed in with this creation attempt?

[root@mckinley-03 ~]# boom profile create --from-host 
Created profile with os_id e681b91:
  OS ID: "e681b91cc8ac8061fad519e6588ec842c728697a",
  Name: "Red Hat Enterprise Linux Server", Short name: "rhel",
  Version: "7.4 (Maipo)", Version ID: "7.4",
  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}"

Which lead to the following list failures:

[root@mckinley-03 ~]# boom profile list
Traceback (most recent call last):
  File "/usr/bin/boom", line 7, in <module>
    main(sys.argv)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 1698, in main
    status = command[1](cmd_args, select, opts, identifier)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 1388, in _list_profile_cmd
    opts=opts, sort_keys=cmd_args.sort)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 883, in print_profiles
    osps = find_profiles(selection=selection)
  File "/usr/lib/python2.7/site-packages/boom/osprofile.py", line 327, in find_profiles
    load_profiles()
  File "/usr/lib/python2.7/site-packages/boom/osprofile.py", line 213, in load_profiles
    (osp.disp_os_id))
UnboundLocalError: local variable 'osp' referenced before assignment



[root@mckinley-03 ~]# boom list
Traceback (most recent call last):
  File "/usr/bin/boom", line 7, in <module>
    main(sys.argv)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 1698, in main
    status = command[1](cmd_args, select, opts, identifier)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 1139, in _list_cmd
    opts=opts, sort_keys=cmd_args.sort)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 526, in print_entries
    bes = find_entries(selection=selection)
  File "/usr/lib/python2.7/site-packages/boom/bootloader.py", line 522, in find_entries
    load_entries()
  File "/usr/lib/python2.7/site-packages/boom/bootloader.py", line 392, in load_entries
    load_profiles()
  File "/usr/lib/python2.7/site-packages/boom/osprofile.py", line 213, in load_profiles
    (osp.disp_os_id))
UnboundLocalError: local variable 'osp' referenced before assignment



Version-Release number of selected component (if applicable):
3.10.0-823.el7.x86_64

lvm2-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-libs-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-cluster-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-lockd-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-python-boom-0.8.1-5.el7    BUILT: Wed Dec  6 04:15:40 CST 2017

Comment 2 Bryn M. Reeves 2018-01-08 17:30:09 UTC
This is the same basic problem as bug 1528014 (not including the built-in profiles), but with an added bug in the exception handler: the OS identifier is undefined when we attempt to print it in this case (the code was written to also output the file name but the format tuple is incorrect).

I'll change this to only print the name of the file that could not be read.

Comment 4 Corey Marthaler 2018-01-30 18:52:24 UTC
Marking verified in the latest rpms. Boom profiles can now be created and properly used.

3.10.0-841.el7.x86_64

lvm2-2.02.177-1.el7    BUILT: Tue Jan 23 16:50:39 CET 2018
lvm2-libs-2.02.177-1.el7    BUILT: Tue Jan 23 16:50:39 CET 2018
lvm2-cluster-2.02.177-1.el7    BUILT: Tue Jan 23 16:50:39 CET 2018
lvm2-lockd-2.02.177-1.el7    BUILT: Tue Jan 23 16:50:39 CET 2018
lvm2-python-boom-0.8.2-1.el7    BUILT: Tue Jan 23 16:53:42 CET 2018


# preloaded doesn't include current running (7.4 + 7.5 kern) yet.
[root@host-083 ~]# boom profile list
OsID    Name                            OsVersion               
9cb53dd Fedora                          24 (Workstation Edition)
9736c34 Fedora                          25 (Server Edition)     
d4439b7 Fedora                          26 (Workstation Edition)
efd6d41 Red Hat Enterprise Linux Server 4 (Server)              
98c3edb Red Hat Enterprise Linux Server 6 (Server)              
c0b921e Red Hat Enterprise Linux Server 7 (Server)              
3fc389b Red Hat Enterprise Linux Server 7.2 (Maipo)             
21e37c8 Ubuntu                          16.04 LTS (Xenial Xerus)

[root@host-083 ~]# boom profile create --from-host --uname-pattern Linux
Created profile with os_id e681b91:
  OS ID: "e681b91cc8ac8061fad519e6588ec842c728697a",
  Name: "Red Hat Enterprise Linux Server", Short name: "rhel",
  Version: "7.4 (Maipo)", Version ID: "7.4",
  UTS release pattern: "Linux",
  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}"

# Now it does
[root@host-083 ~]# boom profile list
OsID    Name                            OsVersion               
9cb53dd Fedora                          24 (Workstation Edition)
9736c34 Fedora                          25 (Server Edition)     
d4439b7 Fedora                          26 (Workstation Edition)
efd6d41 Red Hat Enterprise Linux Server 4 (Server)              
98c3edb Red Hat Enterprise Linux Server 6 (Server)              
c0b921e Red Hat Enterprise Linux Server 7 (Server)              
3fc389b Red Hat Enterprise Linux Server 7.2 (Maipo)             
e681b91 Red Hat Enterprise Linux Server 7.4 (Maipo)             
21e37c8 Ubuntu                          16.04 LTS (Xenial Xerus)

# And it can now be used in creating boot entries
[root@host-083 ~]# boom create --profile e681b91 --title "RHEL7.4 snap1" --rootlv snapper/snap1
Created entry with boot_id 65645b3:
  title RHEL7.4 snap1
  machine-id 40a6ef4b385f4d0694b9c11428e5c0dd
  version 3.10.0-841.el7.x86_64
  linux /vmlinuz-3.10.0-841.el7.x86_64
  initrd /initramfs-3.10.0-841.el7.x86_64.img
  options root=/dev/snapper/snap1 ro rd.lvm.lv=snapper/snap1

[root@host-083 ~]# boom create --profile e681b91 --title "RHEL7.4 snap2" --rootlv snapper/snap2
Created entry with boot_id ad03cc2:
  title RHEL7.4 snap2
  machine-id 40a6ef4b385f4d0694b9c11428e5c0dd
  version 3.10.0-841.el7.x86_64
  linux /vmlinuz-3.10.0-841.el7.x86_64
  initrd /initramfs-3.10.0-841.el7.x86_64.img
  options root=/dev/snapper/snap2 ro rd.lvm.lv=snapper/snap2

[root@host-083 ~]# boom list
BootID  Version                  Name                            RootDevice        
65645b3 3.10.0-841.el7.x86_64    Red Hat Enterprise Linux Server /dev/snapper/snap1
ad03cc2 3.10.0-841.el7.x86_64    Red Hat Enterprise Linux Server /dev/snapper/snap2

Comment 7 errata-xmlrpc 2018-04-10 15:23:49 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, 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/RHEA-2018:0853


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