Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1528014 - boom traceback "IndexError: list index out of range" when attempting create commands, possibly with invalid arguments
boom traceback "IndexError: list index out of range" when attempting create c...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.5
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Marian Csontos
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-20 13:55 EST by Corey Marthaler
Modified: 2018-04-10 11:24 EDT (History)
9 users (show)

See Also:
Fixed In Version: lvm2-2.02.177-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 11:23:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 None None None 2018-04-10 11:24 EDT

  None (edit)
Description Corey Marthaler 2017-12-20 13:55:01 EST
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 12:26:11 EST
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 10:50:50 EST
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 12:15:49 EST
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 11:23:49 EDT
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.