From: Tony Asleson <tasleson@redhat.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Tagging LVs with Python Bindings
Date: Tue, 07 Apr 2015 15:54:15 -0500 [thread overview]
Message-ID: <552443F7.8080207@redhat.com> (raw)
In-Reply-To: <CAKEq5nvhrnJ9Cir70jb8uqmcV42AT2sqGh_qNpo7-rCAu4Gd-A@mail.gmail.com>
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
next prev parent reply other threads:[~2015-04-07 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 17:08 [linux-lvm] Tagging LVs with Python Bindings Michael Schmidt
2015-04-07 20:54 ` Tony Asleson [this message]
2015-04-08 15:47 ` Michael Schmidt
2015-04-08 17:10 ` Tony Asleson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552443F7.8080207@redhat.com \
--to=tasleson@redhat.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).