From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: [RFC] lvmetad_is_disabled: check config before connecting to socket
Date: Fri, 13 Oct 2017 10:32:55 -0500 [thread overview]
Message-ID: <20171013153255.GA3940@redhat.com> (raw)
In-Reply-To: <20171013090842.28186-1-t.lamprecht@proxmox.com>
On Fri, Oct 13, 2017 at 11:08:42AM +0200, Thomas Lamprecht wrote:
> Else, lvmetad always gets started due to systemds socket auto
> activation when executing, for example:
> # pvscan --cache
> as pvscan uses lvmetad_is_disabled to check if metad is disabled
> before connecting.
> An alternative approach would be to just guard the lvmetad_is_disabled
> call in tools/pvscan.c : 412 with the config check - and thus address
> the FIXME mentioned there.
> Would be maybe the less intrusive version?
When lvm.conf has use_lvmetad=0, 'pvscan --cache' should not try to
connect to lvmetad, it should return here:
https://sourceware.org/git/?p=lvm2.git;a=blob;f=tools/pvscan.c;h=6581990f8afeb17f4c7f82c6f6b59fe2ed0b990b;hb=HEAD#l323
so I'm not sure it would get to line 412.
This was a little complicated to get working just right in every case, so
I wouldn't be surprised if it's still off somewhere. There may be some
place where we should call lvmetad_used() prior to calling
lvmetad_is_disabled. I'm not seeing in your message where exactly
lvmetad_is_disabled is being called for you.
Dave
prev parent reply other threads:[~2017-10-13 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 9:08 [RFC] lvmetad_is_disabled: check config before connecting to socket Thomas Lamprecht
2017-10-13 10:06 ` Zdenek Kabelac
2017-10-13 11:23 ` Thomas Lamprecht
2017-10-13 12:04 ` Zdenek Kabelac
2017-10-13 13:25 ` Peter Rajnoha
2017-10-13 15:39 ` David Teigland
2017-10-13 15:32 ` David Teigland [this message]
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=20171013153255.GA3940@redhat.com \
--to=teigland@redhat.com \
--cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.