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 1840488 - traceback when attempting to "boom remove" instead of using supported "boom delete"
Summary: traceback when attempting to "boom remove" instead of using supported "boom d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.9
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-27 03:16 UTC by Corey Marthaler
Modified: 2021-09-03 12:41 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.187-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:56:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3927 0 None None None 2020-09-29 19:56:18 UTC

Description Corey Marthaler 2020-05-27 03:16:13 UTC
Description of problem:

# rhel8.2
[root@hayes-02 ~]#  boom remove ccb55fe
Unknown command type: remove

# rhel7.9
[root@harding-03 /]# boom remove ccb55fe
Traceback (most recent call last):
  File "/usr/bin/boom", line 7, in <module>
    r = main(sys.argv)
  File "/usr/lib/python2.7/site-packages/boom/command.py", line 3179, in main
    if cmd_type[0] == CACHE_TYPE and not bc.cache_enable:
TypeError: 'NoneType' object has no attribute '__getitem__'


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

lvm2-2.02.187-3.el7    BUILT: Tue May 19 06:05:10 CDT 2020
lvm2-libs-2.02.187-3.el7    BUILT: Tue May 19 06:05:10 CDT 2020
lvm2-cluster-2.02.187-3.el7    BUILT: Tue May 19 06:05:10 CDT 2020
lvm2-lockd-2.02.187-3.el7    BUILT: Tue May 19 06:05:10 CDT 2020
lvm2-python-boom-1.1-1.el7    BUILT: Tue May 19 06:07:15 CDT 2020

Comment 2 Bryn M. Reeves 2020-05-27 15:58:24 UTC
This is a regression due to commit 0bde1513 ("boom: don't allow cache commands if !config.cache_enable"). This adds a check to prevent a command of type "boom cache" running when the cache is disabled in boom.conf. The check is applied before validation of the parsed cmd_type, leading to an unhandled exception in the event that the provided command argument is invalid.

The fix is to move the validation before the cache check and I've also added additional checks to distinguish between an unknown subcommand with default type (entry) and a missing argument, which both previously resulted in the same terse "boom: error: too few arguments" message.

Comment 3 Bryn M. Reeves 2020-05-27 16:07:28 UTC
commit 86cac4a0eb35cffbead898af6b18a689db5df92e (HEAD -> master, origin/master)
Author: Bryn M. Reeves <bmr>
Date:   Wed May 27 17:05:00 2020 +0100

    boom.command: fix command validation regression (0bde1513)
    
    This is a regression due to commit 0bde1513 ("boom: don't allow cache
    commands if !config.cache_enable"). This adds a check to prevent a
    command of type "boom cache" running when the cache is disabled in
    boom.conf. The check is applied before validation of the parsed
    cmd_type, leading to an unhandled exception in the event that the
    provided command argument is invalid.
    
    The fix is to move the validation before the cache check and this commit
    also adds additional checks to distinguish between an unknown subcommand
    with default type (entry) and a missing argument, which both previously
    resulted in the same terse "boom: error: too few arguments" message.
    
    Signed-off-by: Bryn M. Reeves <bmr>

Comment 6 Corey Marthaler 2020-06-08 18:03:53 UTC
Fix verified in the latest rpms.

3.10.0-1141.el7.x86_64
lvm2-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-libs-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-cluster-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-lockd-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
lvm2-python-boom-1.2-1.el7    BUILT: Sun Jun  7 08:15:48 CDT 2020
cmirror-2.02.187-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-libs-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-event-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-event-libs-1.02.170-5.el7    BUILT: Sun Jun  7 08:13:11 CDT 2020
device-mapper-persistent-data-0.8.5-3.el7    BUILT: Mon Apr 20 09:49:16 CDT 2020


[root@mckinley-01 ~]# boom list 03d0f0
BootID  Version                  Name                            RootDevice            
03d0f01 3.10.0-1141.el7.x86_64   Red Hat Enterprise Linux Server /dev/snapper/boom_snap
[root@mckinley-01 ~]# boom remove 03d0f01
usage: boom [-h] [-a OPTIONS] [--architecture ARCH] [--backup] [-b BOOT_ID]
            [--boot-dir PATH] [-B SUBVOL] [--btrfs-opts OPTS] [-c FILE]
            [-d OPTIONS] [--debug DEBUGOPTS] [-e IMG] [-E] [--grub-arg ARGS]
            [--grub-class CLASS] [--grub-users USERS] [--grub-id ID] [-H]
            [-P PROFILE] [--host-name HOSTNAME] [-i IMG] [-k PATTERN]
            [--label LABEL] [-l IMG] [-L LV] [--lvm-opts OPTS] [-m MACHINE_ID]
            [-n OSNAME] [--name-prefixes] [--no-headings] [--no-dev]
            [--optional-keys KEYS] [-o FIELDS] [--os-version OSVERSION]
            [-O SORTFIELDS] [-I OSVERSIONID] [--os-options OPTIONS]
            [--os-release OSRELEASE] [-p OS_ID] [-r ROOT] [-R PATTERN]
            [--rows] [--separator SEP] [-s OSSHORTNAME] [-t TITLE]
            [-u PATTERN] [-V] [-v VERSION]
            [TYPE] COMMAND [ID]
Unknown command: remove 03d0f01
[root@mckinley-01 ~]# boom delete 03d0f01
Deleted 1 entry

Comment 8 errata-xmlrpc 2020-09-29 19:56:06 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 (lvm2 bug fix and enhancement update), 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/RHBA-2020:3927


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