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 614049 - Add lvm2app APIs to query all pvs/vgs/lvs report fields and set values as with {pv|vg|lv}change
Summary: Add lvm2app APIs to query all pvs/vgs/lvs report fields and set values as wit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Petr Rockai
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-13 15:13 UTC by Dave Wysochanski
Modified: 2011-05-19 14:26 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.82-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 14:26:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Design notes for generic attributes and why I decided this approach. (1.72 KB, text/plain)
2010-10-07 15:16 UTC, Dave Wysochanski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0772 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-05-18 18:08:31 UTC

Description Dave Wysochanski 2010-07-13 15:13:55 UTC
Description of problem:
lvm2app currently only exports a few of the most common attributes for PVs, VGs, and LVs and a more comprehensive / generic interface is needed on the order of pvs/vgs/lvs reporting commands.  A few patch sets were submitted last year and should be continued to completion.

Ideally this interface should be a simple 'get' / 'set' paradigm, with attribute naming similar to the reporting commands.  Auto-generation of symbols may be used similar to lib/report/columns.h. 


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Dave Wysochanski 2010-10-06 17:32:07 UTC
Fairly large patchset checked in upstream which refactors and extends existing reporting infrastructure.  We now have the framework for this 'get' / 'set' paradigm, and all 'get' functions for PV and VG are checked in too.  Patches that extend lvm2app (lvm_vg_get_property(), etc) have not been checked in yet, but these are small, have been submitted on the list, and testing is on going.  They will be checked in as a group once the remaining items below are finished.

Still todo and in progress:
1) finish 'lv' attributes.
2) add helpers to lookup a pv/lv handle from a vg handle and/or pv/lv name.  Callers can do this now but it is a manual process (must call lvm_vg_list_pvs() or lvm_vg_list_lvs() and then loop through the list comparing.
3) add lvm2app support for 'lvseg' and 'pvseg'
4) finish 'lvseg' and 'pvseg' attributes
5) add unit tests / nightly tests

Comment 2 Dave Wysochanski 2010-10-07 15:16:17 UTC
Created attachment 452120 [details]
Design notes for generic attributes and why I decided this approach.

These were my design notes, and why I decided on this approach to the generic attributes, instead of the earlier approaches / patches posted which extended the reporting infrastructure.

Comment 3 Dave Wysochanski 2010-10-12 14:27:49 UTC
Additional cleanup patch sets proposed as a result of code review:
1) add dm_pool_asprintf().  See https://www.redhat.com/archives/lvm-devel/2010-October/msg00059.html
2) cleanup log_error() paths for attribute patches and lvm2app code.  Make memory allocation failures similar return (some places we are using log_errno(ENOMEM, ...), others return_NULL, etc

Comment 4 Dave Wysochanski 2010-10-21 16:35:34 UTC
Still some final bits to be worked out in exported function prototypes.  Patches are basically ready to go though, with 2 different function prototypes proposed.  Only thing that remains is the two "percent" / float lv fields, and the lvseg/pvseg fields.  I've submitted preliminary patches for most of the lvseg properties, and pvseg fields should be trivial once lvseg properties are finalized.  So this is 95% complete at this point.

Comment 5 Petr Rockai 2010-11-17 21:15:46 UTC
I have merged Dave's patches. I'll create a separate bugzilla for percent fields (I do have a plan) and also for other setters (ideally, when we get some feedback on what is actually needed). I will also make a bugzilla for automated testing coverage of the API. This one can go POST.

Comment 8 errata-xmlrpc 2011-05-19 14:26:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0772.html


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