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 1168751 - broken lvm-set-filter API with newer lvm2
Summary: broken lvm-set-filter API with newer lvm2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-27 17:58 UTC by Pino Toscano
Modified: 2015-07-22 05:56 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.20.11-12.el6
Doc Type: Bug Fix
Doc Text:
The way in which the lvm-set-filter API handles the lvm.conf file has been rewritten, so that lvm-set-filter is properly able to change the LVM device filter.
Clone Of:
Environment:
Last Closed: 2015-07-22 05:56:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1444 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-07-20 18:44:02 UTC

Description Pino Toscano 2014-11-27 17:58:07 UTC
Description of problem:
With recent lvm2 versions, like the one updated in RHEL 6.6, the lvm-set-filter API breaks (test test-lvm-filtering.sh fails).

This happens because in libguestfs < 1.26.9 the lvm-set-filter API manually edits, in a copy of lvm.conf, the uncommented 'filter =' line with the devices to be handled by lvm; recent lvm2 versions do not have any uncommented filter line anymore, and thus the previous libguestfs way breaks.

Further details and upstream fixes are in the following thread:
https://www.redhat.com/archives/libguestfs/2014-August/msg00213.html

How reproducible:
Every time.

Steps to Reproduce:
1. Use lvm-set-filter to set some filter
2. Query the vg's using the vgs API

Actual results:
All the vg's.

Expected results:
Only the vg's matching the set filter.

Additional info:
This has been fixed using three commits (and a cleanup/fixup later one):
9b501fa5c6365958de362ecaf0f4e90c147978a2
abb0b47e3f1b8b86d2d39c2a91782ac5ed4b134e
c916ea5b680776f70f21ecb224e0e2ca7031c0f4
d82cf08ce12ffd86e9f1588881dbe3f0ffd12294

The third one brings an own version of the lvm lens of Augeas; most probably we can have the changes directly in Augeas itself.

Comment 2 Chao Zhang 2014-12-11 10:09:54 UTC
Verify with libguestfs-1.20.11-12.el6


Steps:
1. add images into guestfish
$ guestfish -a test1.img -a RHEL-Server-7.0-64-hvm.raw
><fs>run

2. list the LVM volume groups
><fs>vgs
VG
rhel_dhcp-11-144

3. set filter and list vgs
><fs>list-devices
/dev/sda
/dev/sdb
><fs>lvm-set-filter /dev/sda
><fs>vgs
VG
><fs>lvm-set-filter /dev/sdb
rhel_dhcp-11-144
><fs>lvm-clear-filter
><fs>vgs
VG
rhel_dhcp-11-144

Comment 4 errata-xmlrpc 2015-07-22 05:56:22 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-2015-1444.html


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