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 1335250 - lvm.LibLVMError not handled (but raised in middle of transaction)
Summary: lvm.LibLVMError not handled (but raised in middle of transaction)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Eva Mrakova
URL:
Whiteboard:
: 1335888 1405005 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-11 16:52 UTC by mulhern
Modified: 2021-06-10 11:17 UTC (History)
8 users (show)

Fixed In Version: yum-3.4.3-147.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1335888 (view as bug list)
Environment:
Last Closed: 2016-11-04 05:32:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2397 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2016-11-03 13:55:12 UTC

Description mulhern 2016-05-11 16:52:36 UTC
Description of problem:

lvm exceptions not caught/handled when in midst of transaction.

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

Installed Packages
Name        : yum
Arch        : noarch
Version     : 3.4.3
Release     : 132.el7
Size        : 5.5 M
Repo        : installed
From repo   : RHEL-7.2
Summary     : RPM package installer/updater/manager

How reproducible:

Always, in a sense. That is, if raised, exceptions will not be caught, AFAICT. On the other hand, creating the conditions that cause a specific exception to be raised isn't that easy.

Steps to Reproduce:
1. I did a bunch of things that finally resulted in a stack trace. They were a complicated sequence of downgrades and upgrades using local repos, and I'm not even sure that they were the root of the problem. However, they did cause an exception to be raised.
2. I observed a stack trace:

Running transaction
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 365, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 271, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 773, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1736, in runTransaction
    if self.fssnap.available and ((self.conf.fssnap_automatic_pre or
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1126, in <lambda>
    fssnap = property(fget=lambda self: self._getFSsnap(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1062, in _getFSsnap
    devices=devices)
  File "/usr/lib/python2.7/site-packages/yum/fssnapshots.py", line 158, in __init__
    self._vgnames = _list_vg_names() if self.available else []
  File "/usr/lib/python2.7/site-packages/yum/fssnapshots.py", line 56, in _list_vg_names
    names = lvm.listVgNames()
lvm.LibLVMError: (-1, 'Request to list VGs in lvmetad failed after device filter mismatch.')

3. A quick look at the source seems to indicate that lvm raised exceptions aren't being caught.

Actual results:

Stack trace in middle of transaction.

Expected results:

Better handling of lvm exceptions, especially in this case where there is a check for the result being the empty list already and especially when it occurs in the
middle of a transaction (which are generally considered important not to fail).

Additional info:

None.

Comment 2 mulhern 2016-05-13 13:09:22 UTC
Note that the yum configuration options are:

fssnap_abort_on_errors = any
fssnap_automatic_keep = 1
fssnap_automatic_post = False
fssnap_automatic_pre = False
fssnap_devices = !*/swap,
   !*/lv_swap
fssnap_percentage = 100

AFAIU, this should mean that no snapshot would be taken, so I'm a bit surprised
at seeing the code that caused the stacktrace to be executing at all.

It might be reasonable to not calculate the vgnames in the _FSSnap constructor, but to defer the calculation until the value actually turns out to be needed, which in this case, should be never, I think.

Comment 3 mulhern 2016-05-13 13:24:34 UTC
I cloned the issue raised in Comment#2 to a separate bug, bz#1335888, since it is actually fairly distinct.

Comment 9 Michal Domonkos 2016-07-21 11:27:01 UTC
*** Bug 1335888 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2016-11-04 05:32:09 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://rhn.redhat.com/errata/RHBA-2016-2397.html

Comment 15 Valentina Mukhamedzhanova 2017-07-10 15:18:46 UTC
*** Bug 1405005 has been marked as a duplicate of this bug. ***


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