public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Scott Mayhew <smayhew@redhat.com>
Cc: jlayton@kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [nfs-utils PATCH RFC 6/7] nfsdcld: add /etc/nfs.conf support
Date: Thu, 8 Nov 2018 07:00:38 -0500	[thread overview]
Message-ID: <6c30eb21-7be7-accc-78f7-e2544ed46011@RedHat.com> (raw)
In-Reply-To: <20181106183620.18609-7-smayhew@redhat.com>



On 11/6/18 1:36 PM, Scott Mayhew wrote:
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
>  nfs.conf                  |  4 ++++
>  utils/nfsdcld/nfsdcld.c   | 13 +++++++++++++
>  utils/nfsdcld/nfsdcld.man | 15 +++++++++++++++
>  3 files changed, 32 insertions(+)
> 
> diff --git a/nfs.conf b/nfs.conf
> index 0d0ec9b..2157b9c 100644
> --- a/nfs.conf
> +++ b/nfs.conf
> @@ -33,6 +33,10 @@
>  # state-directory-path=/var/lib/nfs
>  # ha-callout=
>  #
> +#[nfsdcld]
Staring very recently, all sections are now un-commented
 
> +# debug=0
> +# storagedir=/var/lib/nfs/nfsdcld
Does this also need a  
   # pipefsdir=/var/lib/nfs/rpc_pipefs

Or are you grabbing that from the [general] section?

steved.
> +#
>  #[nfsdcltrack]
>  # debug=0
>  # storagedir=/var/lib/nfs/nfsdcltrack
> diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c
> index 272c7c5..313c68f 100644
> --- a/utils/nfsdcld/nfsdcld.c
> +++ b/utils/nfsdcld/nfsdcld.c
> @@ -45,6 +45,7 @@
>  #include "cld-internal.h"
>  #include "sqlite.h"
>  #include "../mount/version.h"
> +#include "conffile.h"
>  
>  #ifndef DEFAULT_PIPEFS_DIR
>  #define DEFAULT_PIPEFS_DIR NFS_STATEDIR "/rpc_pipefs"
> @@ -640,6 +641,7 @@ main(int argc, char **argv)
>  	char *progname;
>  	char *storagedir = CLD_DEFAULT_STORAGEDIR;
>  	struct cld_client clnt;
> +	char *s;
>  
>  	memset(&clnt, 0, sizeof(clnt));
>  
> @@ -653,6 +655,17 @@ main(int argc, char **argv)
>  	xlog_syslog(0);
>  	xlog_stderr(1);
>  
> +	conf_init_file(NFS_CONFFILE);
> +	s = conf_get_str("general", "pipefs-directory");
> +	if (s)
> +		strlcpy(pipefs_dir, s, sizeof(pipefs_dir));
> +	s = conf_get_str("nfsdcld", "storagedir");
> +	if (s)
> +		storagedir = s;
> +	rc = conf_get_num("nfsdcld", "debug", 0);
> +	if (rc > 0)
> +		xlog_config(D_ALL, 1);
> +
>  	/* process command-line options */
>  	while ((arg = getopt_long(argc, argv, "hdFp:s:", longopts,
>  				  NULL)) != EOF) {
> diff --git a/utils/nfsdcld/nfsdcld.man b/utils/nfsdcld/nfsdcld.man
> index b607ba6..c271d14 100644
> --- a/utils/nfsdcld/nfsdcld.man
> +++ b/utils/nfsdcld/nfsdcld.man
> @@ -163,6 +163,21 @@ Location of the rpc_pipefs filesystem. The default value is
>  .IX Item "-s storagedir, --storagedir=storage_dir"
>  Directory where stable storage information should be kept. The default
>  value is \fI/var/lib/nfs/nfsdcld\fR.
> +.SH "CONFIGURATION FILE"
> +.IX Header "CONFIGURATION FILE"
> +The following values are recognized in the \fB[nfsdcld]\fR section
> +of the \fI/etc/nfs.conf\fR configuration file:
> +.IP "\fBstoragedir\fR" 4
> +.IX Item "storagedir"
> +Equivalent to \fB\-s\fR/\fB\-\-storagedir\fR.
> +.IP "\fBdebug\fR" 4
> +.IX Item "debug"
> +Setting "debug = 1" is equivalent to \fB\-d\fR/\fB\-\-debug\fR.
> +.LP
> +In addition, the following value is recognized from the \fB[general]\fR section:
> +.IP "\fBpipefs\-directory\fR" 4
> +.IX Item "pipefs-directory"
> +Equivalent to \fB\-p\fR/\fB\-\-pipefsdir\fR.
>  .SH "NOTES"
>  .IX Header "NOTES"
>  The Linux kernel NFSv4 server has historically tracked this information
> 

  reply	other threads:[~2018-11-08 12:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 18:36 [nfs-utils PATCH RFC 0/7] restore nfsdcld Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 1/7] Revert "nfsdcltrack: remove the nfsdcld daemon" Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 2/7] nfsdcld: move nfsdcld to its own directory Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 3/7] nfsdcld: a few enhancements Scott Mayhew
2018-11-10 14:16   ` Jeff Layton
2018-11-06 18:36 ` [nfs-utils PATCH RFC 4/7] nfsdcld: remove some unused functions Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 5/7] nfsdcld: the -p option should specify the rpc_pipefs mountpoint Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 6/7] nfsdcld: add /etc/nfs.conf support Scott Mayhew
2018-11-08 12:00   ` Steve Dickson [this message]
2018-11-08 13:09     ` Scott Mayhew
2018-11-06 18:36 ` [nfs-utils PATCH RFC 7/7] systemd: add a unit file for nfsdcld Scott Mayhew

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=6c30eb21-7be7-accc-78f7-e2544ed46011@RedHat.com \
    --to=steved@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=smayhew@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