Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
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.
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 15Valentina Mukhamedzhanova
2017-07-10 15:18:46 UTC
*** Bug 1405005 has been marked as a duplicate of this bug. ***
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.