public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: NeilBrown <neilb@suse.de>
Cc: Simo Sorce <simo@redhat.com>, Steve Dickson <SteveD@redhat.com>,
	Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] nfs-service: Added the starting of gssproxy
Date: Tue, 23 Sep 2014 15:23:11 -0400	[thread overview]
Message-ID: <20140923192311.GI29932@fieldses.org> (raw)
In-Reply-To: <20140923021110.GB1409@fieldses.org>

On Mon, Sep 22, 2014 at 10:11:10PM -0400, J. Bruce Fields wrote:
> On Tue, Sep 23, 2014 at 12:08:04PM +1000, NeilBrown wrote:
> > I think you need
> >    Type=oneshot
> > 
> > else systemd won't wait for the modprobe to complete before running the other
> > services.
...
> > I don't think you want an install section.  That means the service has to be
> > explicitly enabled, which is a pain.
> > I think nfs-server.service should Want= this.

And nfs-client.target?

> > I also think 
> > 
> >   ConditionPathExists=/etc/krb5.keytab
> > 
> > would be appropriate.

Still untested:

--b.

commit 3fab32b4bf96
Author: J. Bruce Fields <bfields@redhat.com>
Date:   Mon Sep 22 21:43:59 2014 -0400

    systemd: manually insert auth_rpcgss module.
    
    We need to insert the auth_rpcgss module before starting rpc.svcgssd or
    gss-proxy, for two reasons:
    
    	- gss-proxy needs access to the /proc/net/rpc/use-gss-proxy file
    	  to set up communication with knfsd.
    	- the unit files need to able to test for the existance of the
    	  same path in order to decide whether the kernel supports
    	  gss-proxy or not.
    
    Currently we're using dependencies on proc-fs-nfsd.mount for this, but
    that works only because of the nfsd kernel module references some
    symbols in auth_rpcgss, which is an odd implementation detail we're
    likely to fix some day.
    
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>

diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service
new file mode 100644
index 000000000000..3fc2f4ac924f
--- /dev/null
+++ b/systemd/auth-rpcgss-module.service
@@ -0,0 +1,14 @@
+# We want to start gss-proxy on kernels that support it and rpc.svcgssd
+# on those that don't.  Those services check for support by checking
+# for existence of the path /proc/net/rpc/use-gss-proxy.  Before they
+# can perform that check, they need this module loaded.  (Unless
+# rpcsec_gss support is built directly into the kernel, in which case this
+# unit will fail.  But that's OK.)
+[Unit]
+Description=Kernel Module supporting RPCSEC_GSS
+Before=gssproxy.service rpc-svcgssd.service
+ConditionPathExists=/etc/krb5.keytab
+
+[Service]
+Type=oneshot
+ExecStart=/sbin/modprobe -q auth_rpcgss
diff --git a/systemd/nfs-client.target b/systemd/nfs-client.target
index f3c09e76a0f7..474f5e9ad74b 100644
--- a/systemd/nfs-client.target
+++ b/systemd/nfs-client.target
@@ -5,7 +5,7 @@ Wants=remote-fs-pre.target
 
 # Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to
 # start that on demand if needed.
-Wants=rpc-gssd.service rpc-svcgssd.service
+Wants=rpc-gssd.service rpc-svcgssd.service auth-rpcgss-module.service
 Wants=nfs-blkmap.service rpc-statd-notify.service
 Before=rpc-gssd.service rpc-svcgssd.service nfs-blkmap.service
 
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index 2fa7387e1cb9..fd213a3995de 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -3,6 +3,7 @@ Description=NFS server and services
 Requires= network.target proc-fs-nfsd.mount rpcbind.target
 Requires= nfs-mountd.service
 Wants=rpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd.service
+Wants=auth-rpcgss-module.service
 Wants=rpc-statd-notify.service
 
 After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service

  reply	other threads:[~2014-09-23 19:23 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 19:20 [PATCH 0/2] Use the gssproxy damon for GSSAPI credentials (v3) Steve Dickson
2014-09-22 19:20 ` [PATCH 1/2] nfs-service: Added the starting of gssproxy Steve Dickson
2014-09-22 19:26   ` Simo Sorce
2014-09-22 19:43     ` Steve Dickson
2014-09-22 20:44       ` J. Bruce Fields
2014-09-22 21:14         ` Steve Dickson
2014-09-22 21:32           ` Simo Sorce
2014-09-22 22:57             ` Steve Dickson
2014-09-23  0:19               ` Simo Sorce
2014-09-23  1:19                 ` Steve Dickson
2014-09-23 12:52                   ` Simo Sorce
2014-09-23 14:58                     ` Steve Dickson
2014-09-23 15:08                       ` Simo Sorce
2014-09-23 19:29                     ` J. Bruce Fields
2014-09-23 19:40                       ` Simo Sorce
2014-09-23 19:51                         ` J. Bruce Fields
2014-09-22 22:34           ` J. Bruce Fields
2014-09-22 23:58             ` Steve Dickson
2014-09-23  0:26               ` Simo Sorce
2014-09-23  1:55                 ` J. Bruce Fields
2014-09-23  2:08                   ` NeilBrown
2014-09-23  2:11                     ` J. Bruce Fields
2014-09-23 19:23                       ` J. Bruce Fields [this message]
2014-09-23 20:17                         ` Steve Dickson
2014-09-23 20:25                           ` J. Bruce Fields
2014-09-23 21:15                             ` Steve Dickson
2014-09-24 15:07                               ` Steve Dickson
2014-09-24 15:15                                 ` J. Bruce Fields
2014-09-24 15:23                                 ` J. Bruce Fields
2014-09-24 15:30                                   ` Steve Dickson
2014-09-23 12:48                     ` Simo Sorce
2014-09-23 15:20                       ` J. Bruce Fields
2014-09-23 16:00                         ` Simo Sorce
2014-09-23 16:12                           ` J. Bruce Fields
2014-09-23 16:57                             ` Simo Sorce
2014-09-23 12:46                   ` Simo Sorce
2014-09-23 15:06                   ` Steve Dickson
2014-09-23 15:16                     ` J. Bruce Fields
2014-09-23 15:52                       ` Steve Dickson
2014-09-23 16:05                         ` J. Bruce Fields
2014-09-23  2:01             ` NeilBrown
2014-09-22 19:40   ` J. Bruce Fields
2014-09-22 19:46     ` Simo Sorce
2014-09-22 19:53       ` Steve Dickson
2014-09-22 20:00         ` Simo Sorce
2014-09-22 20:02           ` Steve Dickson
2014-09-23  1:42           ` NeilBrown
2014-09-23  2:09             ` J. Bruce Fields
2014-09-23  2:55               ` NeilBrown
2014-09-23 12:45             ` Simo Sorce
2014-09-22 19:20 ` [PATCH 2/2] rpc.svcgssd: the build of rpc.svcgssd is off by default Steve Dickson
2014-09-22 19:43   ` J. Bruce Fields
2014-09-22 19:50     ` Steve Dickson
2014-09-22 20:21       ` J. Bruce Fields

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=20140923192311.GI29932@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=simo@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