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 1211183 - lv_attr property returns unknown values in lvm2-2.02.115-3.el7 which breaks storaged, which breaks Cockpit
Summary: lv_attr property returns unknown values in lvm2-2.02.115-3.el7 which breaks s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1187481
Blocks: 1143927 1222115
TreeView+ depends on / blocked
 
Reported: 2015-04-13 09:20 UTC by Marius Vollmer
Modified: 2023-03-08 07:27 UTC (History)
21 users (show)

Fixed In Version: lvm2-2.02.125-1.el7
Doc Type: Bug Fix
Doc Text:
A regression in lvm_lv_get_attr lvm2app library function caused it to improperly indicate unknown values (indicated by letter "X") for specific attributes like "active" and "open" attribute. This regression is now fixed and the lvm_lv_get_attr lvm2app function now returns proper attributes corresponding to current state of the LVM volume.
Clone Of: 1187481
: 1222115 (view as bug list)
Environment:
Last Closed: 2015-11-19 12:46:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2147 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-11-19 11:11:07 UTC

Description Marius Vollmer 2015-04-13 09:20:20 UTC
+++ This bug was initially created as a clone of Bug #1187481 +++

Description of problem:

lvm2app has regressed with regard to the "lv_attr" property: lvm_lv_get_property does no longer deliver a value for it.

This means that storaged treats all logical volumes as inactive and doesn't recognize thin pools and snapshots anymore, among other things. 

Switching from lvm_lv_get_property to lvm_lv_get_attr is not enough.  The latter returns incomplete attributes where 'active' and 'open' are set to "unknown".

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

lvm2-2.02.115-1.fc21.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Create a thin pool with Cockpit

Actual results:

Thin pool is created but shown as a inactive plain logical volume.

Expected results:

This pool is shown as a active thin pool

Additional info:

https://www.redhat.com/archives/lvm-devel/2015-January/msg00075.html

--- Additional comment from Marius Vollmer on 2015-01-30 02:45:55 EST ---

Looks like lvm2app is unmaintained and storaged should be ported away from it.  Would it make sense to remove lvm2app from Fedora (and maybe the world)?

--- Additional comment from Peter Rajnoha on 2015-01-30 04:03:32 EST ---

Currently, there are several changes in the reporting area of LVM2 code. One of those changes is that we're trying to reuse the same info and status ioctl result for one reporting line, removing a need to call several ioctl per one line of report output which can save some time and resources.

Unfortunately, one of the recent changes, where we tried to convert the lv_attr (and hence the lvm_lv_get_attr lvm2app counterpart), we introduced a regression that got unnoticed and it caused some of these "info" and "status" attributes in lv_attr (and the string returned by lvm_lv_get_attr) to have "unknown" (the "X") value.

Sorry for that! It should be fixed by this patch now:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=531cc58d899b7dd1421bfe83f5503aa266390334

I'll do a new update with this fix in for f21.

--- Additional comment from Marius Vollmer on 2015-01-30 04:11:07 EST ---

> It should be fixed by this patch now:

Great, thanks!

From reading the patch, I think this doesn't fully fix the regression, unfortunately.

lvm_lv_get_property can't find the "lv_attr" attribute at all anymore, because it's type was changed from LVS to LVSSTATUSINFO, as far as I can tell.

We can easily update storaged to use lvm_lv_get_attr, though.

What do you propose?

--- Additional comment from Marius Vollmer on 2015-01-30 04:14:03 EST ---

Correction: snapshots are recognized.

--- Additional comment from Peter Rajnoha on 2015-01-30 04:34:04 EST ---

Just looking at the lvm_lv_get_property. You can also use lvm_lv_get_attr - internally, it's the same code which gets the value - in case lvm_lv_get_attr it's direct call to acquire the attr string. The lvm_lv_get_property is the general one for all fields which has some extra wrappers to handle this in general way, but underneath, for the lv_attr, it returns exactly the same as lvm_lv_get_attr.

--- Additional comment from Marius Vollmer on 2015-01-30 05:04:15 EST ---

> You can also use lvm_lv_get_attr - internally, it's the same code which gets the value 

Yes, but we need to change storaged for that, and rush the new version into Fedora.  That's fine, but if you are going to fix the lvm_lv_get_property regression as well, we don't need to even do that.

--- Additional comment from Peter Rajnoha on 2015-01-30 05:08:58 EST ---

Yes, if you wait a bit, I think I can fix that. Hopefully today.

--- Additional comment from Peter Rajnoha on 2015-01-30 05:22:54 EST ---

So this one should fix the issue with lvm_lv_get_property:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=8650404df1884f1e040aad4343c8db0eac71e125

I've tested that on my machine, but I'll do a scratch for you to test too, just for sure.

--- Additional comment from Peter Rajnoha on 2015-01-30 05:36:12 EST ---

F21 scratch build here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8781186

--- Additional comment from Marius Vollmer on 2015-01-30 05:44:50 EST ---

> F21 scratch build here:

Awesome!  Testing...

--- Additional comment from Marius Vollmer on 2015-01-30 05:55:14 EST ---

(In reply to Marius Vollmer from comment #10)
> > F21 scratch build here:
> 
> Awesome!  Testing...

Works as expected.  Lvm_lv_get_property returns good values for "lv_attr"  and storaged recognizes volumes as thin pools again.

Thanks!

--- Additional comment from Peter Rajnoha on 2015-01-30 06:35:50 EST ---

OK, there's going to be a new upstream release today anyway, so I'll do rawhide and F21 pkgs then.

--- Additional comment from Fedora Update System on 2015-01-30 12:42:54 EST ---

lvm2-2.02.116-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/lvm2-2.02.116-3.fc21

--- Additional comment from Fedora Update System on 2015-01-31 19:26:24 EST ---

Package lvm2-2.02.116-3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lvm2-2.02.116-3.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1504/lvm2-2.02.116-3.fc21
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2015-02-02 12:23:39 EST ---

lvm2-2.02.116-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

--- Additional comment from Marius Vollmer on 2015-02-03 03:02:46 EST ---

Thanks, excellent service, will shop again!

Comment 2 Peter Rajnoha 2015-04-13 09:36:25 UTC
The fix will get into 7.2 as part of the lvm2 rebase we plan there. Do we need 7.1 z-stream for this too?

Comment 3 Marius Vollmer 2015-04-13 11:42:30 UTC
(In reply to Peter Rajnoha from comment #2)
> The fix will get into 7.2 as part of the lvm2 rebase we plan there. Do we
> need 7.1 z-stream for this too?

No, 7.2 is enough.  Thanks!

Comment 5 Marius Vollmer 2015-04-17 07:46:09 UTC
(In reply to Marius Vollmer from comment #3)
> (In reply to Peter Rajnoha from comment #2)
> > The fix will get into 7.2 as part of the lvm2 rebase we plan there. Do we
> > need 7.1 z-stream for this too?
> 
> No, 7.2 is enough.  Thanks!

Sorry, that was a mistake.  Fixing this in 7.1 would be really appreciated.

Comment 7 Peter Rajnoha 2015-04-17 08:00:00 UTC
OK, the fix is simple one-liner so there's no problem in backporting the patch. Proposing for 7.1.z.

(Moving this BZ back to POST, we need this bz to be cloned by PM for 7.1.z)

Comment 8 Marius Vollmer 2015-04-17 08:25:16 UTC
(In reply to Peter Rajnoha from comment #7)
> OK, the fix is simple one-liner so there's no problem in backporting the
> patch. Proposing for 7.1.z.

Great, thanks a lot!

Note that you need both of these:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=531cc58d899b7dd1421bfe83f5503aa266390334
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=8650404df1884f1e040aad4343c8db0eac71e125

so it is a three line fix.  :-)

Comment 13 errata-xmlrpc 2015-11-19 12:46:27 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-2147.html


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