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 1528014 - boom traceback "IndexError: list index out of range" when attempting create commands, possibly with invalid arguments
Summary: boom traceback "IndexError: list index out of range" when attempting create c...
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
medium
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 18:55 UTC by Corey Marthaler
Modified: 2021-09-03 12:38 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 18:55:01 UTC
Description of problem:
I was just playing around here w/ what I saw on the man page, but with a real (non bootable) snapshot

[root@mckinley-03 ~]# boom create --profile 3fc389b --title "RHEL7 snapshot" --version 3.10-272.el7 --rootlv snapper/snap1
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 968, in _create_cmd
    osp = osps[0]
IndexError: list index out of range

[root@mckinley-03 ~]# boom create --profile 3fc389b  --rootlv snapper/snap1
create requires --title

[root@mckinley-03 ~]# boom create --profile 3fc389b --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
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 968, in _create_cmd
    osp = osps[0]
IndexError: list index out of range

[root@mckinley-03 ~]# boom create --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
create requires --profile

[root@mckinley-03 ~]# boom create --profile fake_profile --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
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 968, in _create_cmd
    osp = osps[0]
IndexError: list index out of range

[root@mckinley-03 ~]# boom create --profile fake_profile --title my_title  --rootlv snapper/snap1
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 968, in _create_cmd
    osp = osps[0]
IndexError: list index out of range


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:26:11 UTC
OK. I think I see what's up here - for some reason the pacakged profiles are not being included in /boot for the lvm2-python-boom subpackage (the original Copr builds do include these files):

# rpm -ql lvm2-python-boom | grep boom\/profiles
/boot/boom/profiles
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile
/usr/share/doc/lvm2-python-boom-0.8.1/tests/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile
...

So although they are there in /usr/share/doc they are not usable (since boom stores all its configuration in /boot so that it is available to all OS instances).

If you still have the machine available, could you try a quick confirmation by just copying those files from /usr/share/doc/... to /boot/boom/profiles?

I expect the output of "boom profile list" is empty too.

So it should be just a simple packaging change to fix this problem but I'll also make sure we output a more helpful error message - I was expecting that to get caught already so there's obviously some bug there.

I believe this is also the problem in bug 1528018.

Comment 3 Bryn M. Reeves 2018-01-17 15:50:50 UTC
The ugly backtrace is fixed in upstream release 0.8.2, which should be picked up in a build shortly and the remaining problem (missing profiles in /boot) should just be a simple packaging fix.

Comment 5 Corey Marthaler 2018-01-30 17:15:49 UTC
Marking verified with the latest rpms. The tracebacks now appear fixed. 

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



[root@host-083 ~]# lvs -a -o +devices
  LV     VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  root   rhel_host-083 -wi-ao----  <6.20g                                                     /dev/vda2(205)
  swap   rhel_host-083 -wi-ao---- 820.00m                                                     /dev/vda2(0)
  origin snapper       owi-a-s--- 300.00m                                                     /dev/sdg1(0)
  snap1  snapper       swi-a-s--- 100.00m      origin 0.00                                    /dev/sdg1(100)
  snap2  snapper       swi-a-s--- 100.00m      origin 0.00                                    /dev/sdg1(125)

[root@host-083 ~]# boom list
BootID  Version                  Name                     RootDevice

[root@host-083 ~]# boom create --profile 3fc389b --title "RHEL7 snapshot" --version 3.10-272.el7 --rootlv snapper/snap1
Created entry with boot_id e2db6c7:
  title RHEL7 snapshot
  machine-id 40a6ef4b385f4d0694b9c11428e5c0dd
  version 3.10-272.el7
  linux /vmlinuz-3.10-272.el7
  initrd /initramfs-3.10-272.el7.img
  options root=/dev/snapper/snap1 ro rd.lvm.lv=snapper/snap1 rhgb quiet

[root@host-083 ~]# boom create --profile 3fc389b  --rootlv snapper/snap1
create requires --title

[root@host-083 ~]# boom create --profile 3fc389b --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
Created entry with boot_id 59076fb:
  title my_title
  machine-id 40a6ef4b385f4d0694b9c11428e5c0dd
  version 3.10-272.el7
  linux /vmlinuz-3.10-272.el7
  initrd /initramfs-3.10-272.el7.img
  options root=/dev/snapper/snap1 ro rd.lvm.lv=snapper/snap1 rhgb quiet

[root@host-083 ~]# boom create --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
Entry already exists (boot_id=59076fb).

[root@host-083 ~]# boom create --title my_title2 --version 3.10-272.el7 --rootlv snapper/snap1
Created entry with boot_id b01db4d:
  title my_title2
  machine-id 40a6ef4b385f4d0694b9c11428e5c0dd
  version 3.10-272.el7
  linux /vmlinuz-3.10-272.el7
  initrd /initramfs-3.10-272.el7.img
  options root=/dev/snapper/snap1 ro rd.lvm.lv=snapper/snap1 rhgb quiet

[root@host-083 ~]# boom create --profile fake_profile --title my_title --version 3.10-272.el7 --rootlv snapper/snap1
OsProfile not found: fake_profile

[root@host-083 ~]# boom list
BootID  Version                  Name                            RootDevice        
e2db6c7 3.10-272.el7             Red Hat Enterprise Linux Server /dev/snapper/snap1
59076fb 3.10-272.el7             Red Hat Enterprise Linux Server /dev/snapper/snap1
b01db4d 3.10-272.el7             Red Hat Enterprise Linux Server /dev/snapper/snap1

[root@host-083 ~]# boom delete e2db6c7
Deleted 1 entry
[root@host-083 ~]# boom delete 59076fb
Deleted 1 entry
[root@host-083 ~]# boom delete b01db4d
Deleted 1 entry

Comment 8 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.