Re: [PATCH 1/2] nfs-service: Added the starting of gssproxy

J. Bruce Fields
2014-09-23T02:11:12Z

On Tue, Sep 23, 2014 at 12:08:04PM +1000, NeilBrown wrote:
> On Mon, 22 Sep 2014 21:55:49 -0400 "J. Bruce Fields" <bfields@fieldses.org>
> wrote:
> > So, something like this? (Untested, no idea if I'm doing this right.)
> >
> > --b.
> >
> > diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service
> > new file mode 100644
> > index 000000000000..252545b458fd
> > --- /dev/null
> > +++ b/systemd/auth-rpcgss-module.service
> > @@ -0,0 +1,15 @@
> > +# 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 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
> > +
> > +[Service]
> > +ExecStart=/sbin/modprobe -q auth_rpcgss
>
> I think you need
> Type=oneshot
>
> else systemd won't wait for the modprobe to complete before running the other
> services.

Whoops, yes, thought I'd done that but I guess not.

> > +
> > +[Install]
> > +WantedBy=gssproxy.service rpc-svcgssd.service
>
> 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.
> I also think
>
> ConditionPathExists=/etc/krb5.keytab
>
> would be appropriate.

OK.

--b.