[linux-lvm] Tagging LVs with Python Bindings

Michael Schmidt schmidmt at gmail.com
Wed Apr 8 15:47:42 UTC 2015


Much appreciated. I'll integrated your fix into the build I have.

I looked through Bugzilla and didn't see anything and decided it would be
more straight forward to ask if there was an existing method to solve the
problem before suggesting it was a bug.

-Mike Schmidt

On Tue, Apr 7, 2015 at 3:54 PM, Tony Asleson <tasleson at redhat.com> wrote:

> On 04/06/2015 12:08 PM, Michael Schmidt wrote:
> > Hi all,
> >
> > While working with the Python bindings and attempting to add tags to
> > logical volume lvm_vg_write seems not to be called. This means if add_tag
> > is called and the virtual group handle is closed the tags disappear.
>
> Thanks for reporting this!
>
> > The
> > action in _liblvm_lvm_vg_add_tag solves this by calling lvm_vg_write on
> the
> > handle itself. Since the lv handle does not seem to have access to it's
> vg
> > handle I added a method to the vg just to trigger a write:
>
> The python bindings were written with the expectation that the state
> changes would be saved automatically.  So adding a call for the user to
> issue a write on the vg goes against the overall design.
>
> ...
>
> > My question is: is there a better way to accomplish this?
>
> In this case we should issue the lvm_vg_write in the add/remove tag
> calls for the lv.  The lv structure has a pointer to the parent vg in
> the python binding.
>
> I submitted a patch which does this and improves the unit test to test
> for this.
>
> Any bugzilla submitted for this?
>
> Regards,
> Tony
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>



-- 
Michael T Schmidt | schmidmt.com | duality.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20150408/e6d7531e/attachment.htm>


More information about the linux-lvm mailing list