All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Add configure option to select default run directory base and prepare for early /run use
Date: Fri, 21 Oct 2011 12:55:30 +0200	[thread overview]
Message-ID: <4EA14FA2.9030705@redhat.com> (raw)
In-Reply-To: <4EA1404A.5020500@redhat.com>

Dne 21.10.2011 11:50, Peter Rajnoha napsal(a):
> On systemd-enabled systems the /run is writeable and it's accessible early on
> boot so we don't need to use --sysinit anymore on early boot's vgchange call
> (the --sysint is just a shortcut for --ignorelockingfailure, --ignoremonitoring,
> --poll n and setting the LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES).
> 
> This patch adds a new configure option "--with-default-run-dir-base" with which
> it's possible to change the run directory base for all directories/files that
> need to be moved to /run in one go easily.
> 
> This patch also removes some hardcoded defines (in dmeventd.h and dm-event.socket
> files used for systemd).
> 
> The patch also changes the dependencies a bit (in Fedora, but the same logic
> applies anywhere):
> 
> originally:
> 
>   <dm-event.socket>
>   ...
>   fedora-wait-storage.service
>   fedora-storage-init.service (calling vgchange -a y --sysinit)
>   dm-event.service
>   lvm2-monitor.service
> 
> changing to:
> 
>   <dm-event.socket>
>   ...
>   fedora-wait-storage.service
>   dm-event.service
>   fedora-storage-init.service (calling vgchange -a y, without --sysinit!!!)
>   lvm2-monitor.service (this is just for proper shutdown now since the dmevent
>                         registration will happen within the vgchange -a y call
>                         in previous step)
> 
> 
> (For FIFO-based activation, the fifos are already prepared and hence the
> dm-event service could be spawned already)
> 
> Once we have this patch upstream and in the distro, we can remove the --sysinit
> from the vgchange call.
> 
> Peter
> ---
> 
>  configure.in                                |   29 +++++++++++++++++++-------
>  daemons/dmeventd/dmeventd.h                 |    4 +-
>  lib/misc/configure.h.in                     |    3 ++
>  make.tmpl.in                                |    1 +
>  scripts/dm_event_systemd_red_hat.service.in |    4 +-
>  scripts/dm_event_systemd_red_hat.socket     |   11 ----------
>  scripts/dm_event_systemd_red_hat.socket.in  |   11 ++++++++++
>  7 files changed, 40 insertions(+), 23 deletions(-)
> 
> diff --git a/configure.in b/configure.in
> index 5275b95..26eb268 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -425,6 +425,17 @@ AC_ARG_WITH(ocfdir,
>  	    OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2')
>  

>  fi
> @@ -1214,9 +1225,9 @@ fi
>  
>  AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.])
>  AC_ARG_WITH(default-run-dir,
> -	    [  --with-default-run-dir=DIR       Default run directory [[/var/run/lvm]] ],
> +	    [  --with-default-run-dir=DIR       Default run directory [[RDIR/lvm]] ],
>  	    [ DEFAULT_RUN_DIR="$withval" ],
> -	    [ DEFAULT_RUN_DIR="/var/run/lvm" ])
> +	    [ DEFAULT_RUN_DIR="$DEFAULT_RUN_DIR_BASE/lvm" ])
>  AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] )
>  


I guess we should stay with just one place to configure /var/run

So I'd replace DEFAULT_RUN_DIR usage in the code  with  DEFAULT_RUN_DIR/lvm
and use just this define.

It should be backward compatible - so if someone configured it before - he
will just get there extra lvm subdir - but this shouldn't cause problems.

With double configuration for run dir it's getting way too complex.

Zdenek



  reply	other threads:[~2011-10-21 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21  9:50 [PATCH] Add configure option to select default run directory base and prepare for early /run use Peter Rajnoha
2011-10-21 10:55 ` Zdenek Kabelac [this message]
2011-10-21 11:14   ` Peter Rajnoha

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=4EA14FA2.9030705@redhat.com \
    --to=zkabelac@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.