gssd ignores RPCGSSDOPTS and GSSDOPTS in /etc/default/nfs-common , no documented alternative is available on Xenial

Bug #1023051 reported by Lukas Hejtmanek on 2012-07-10
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Undecided
Unassigned

Bug Description

Hi,

transition of nfs-common SYSV init start script to upstart does not fully honor /etc/default/nfs-common settings. RPCGSSDOPTS is not passed as arguments to rpc.gssd daemon. It used to work with SYSV init start script.

my nfs-common version is 1:1.2.6-2ubuntu1 (amd64), Ubuntu quantal, but it is present also in 12.04 version.

--
Lukas Hejtmanek

Steve Langasek (vorlon) wrote :

It did work, but this was never documented as one of the supported variables in /etc/default/nfs-common and there is no other reason for /etc/init/gssd.conf to source /etc/default/nfs-common. You should make your changes to /etc/init/gssd.conf directly instead, or in Ubuntu 12.04 and above, use an override file to replace the exec line.

Changed in nfs-utils (Ubuntu):
status: New → Invalid
Lukas Hejtmanek (xhejtman) wrote :

Isn't /etc/init/gssd.conf overwriten on update of nfs-common?

On Tue, Jul 10, 2012 at 06:33:48PM -0000, Lukas Hejtmanek wrote:
> Isn't /etc/init/gssd.conf overwriten on update of nfs-common?

No, it's a conffile. If there are any system-provided changes to the
upstart job, you will be prompted at upgrade time to resolve the conflict.

Hi,

I spent 2 days trying hard to set NFSv4 without any GSSD log because of this issue. It's only when I launched rpc.gssd -f -vvv manually that I finally find my way...

As the official Ubuntu NFSv4Howto (https://help.ubuntu.com/community/NFSv4Howto) advises to set RPCGSSDOPTS='-vvv' in /etc/default/nfs-common, I think this should really be re-considered as a bug.

It should be easy to have the gssd.conf file consider the RPCGSSDOPTS parameter of /etc/default/nfs-common file as are other parameters of this file.

Frédéric Nass (nass) on 2013-01-16
Changed in nfs-utils (Ubuntu):
status: Invalid → New
Frédéric Nass (nass) wrote :

I dared to re-open this report hopping that it'll help being discussed again, but feel free to close it again if you don't share my view on this.

On Wed, Jan 16, 2013 at 10:10:02PM -0000, Frédéric Nass wrote:
> As the official Ubuntu NFSv4Howto
> (https://help.ubuntu.com/community/NFSv4Howto) advises to set
> RPCGSSDOPTS='-vvv' in /etc/default/nfs-common,

Thanks for pointing this out. That documentation is quite outdated and
clearly unmaintained; I've taken a pass at updating it, including
documenting the proper steps for overriding the rpc.gssd options with
upstart.

I don't warrant that the document is now correct, only fixed the most
glaring references to interfaces that are obsolete.

Changed in nfs-utils (Ubuntu):
status: New → Invalid

Sorry, but I don't understand the reasoning behind this decision to exclude gssd options from the default file. It already includes "STATDOPTS" and setting "GSSDOPTS" here too would seem consistent. Isn't this what the default file is for?

I had a go at changing /etc/init/gssd.override to put the options "-ne" per https://help.ubuntu.com/community/NFSv4Howto and it doesn't work on Xenial.

Could you add the line
echo GSSDARGS=\"$GSSDOPTS\"
to /usr/lib/systemd/scripts/nfs-utils_env.sh in nfs-common, please?

This problem has apparently become relevant again in Xenial with the switch to systemd.

Changed in nfs-utils (Ubuntu):
status: Invalid → New
Steve Langasek (vorlon) wrote :

it's no more relevant than it was before. /etc/default/* files are considered deprecated in systemd and supported for nfs-utils only for backwards-compatibility. The supported way to override the settings of a service unit is to create a separate file under /etc/systemd/system. You can do this interactively using the command 'systemctl edit gssd.service'.

Changed in nfs-utils (Ubuntu):
status: New → Invalid

Not "systemctl edit rpc-gssd.service" ? i.e. to override /lib/systemd/system/rpc-gssd.service

Why does /lib/systemd/system/rpc-gssd.service have the line "ExecStart=/usr/sbin/rpc.gssd $GSSDARGS" if $GSSDARGS are not supported?

I tried running "systemctl edit rpc-gssd.service" and entering the line "ExecStart=/usr/sbin/rpc.gssd -ne $GSSDARGS" after reverting the changes to /usr/lib/systemd/scripts/nfs-utils_env.sh and /etc/default/nfs-common

This did not work (i.e. add the flags "-ne" to rpc.gssd), nor did "systemctl edit gssd.service".

The equivalent of using RPCGSSDOPTS or GSSDOPTS in /etc/default/nfs-common is not documented for Xenial.

summary: - gssd ignores RPCGSSDOPTS in /etc/default/nfs-common
+ gssd ignores RPCGSSDOPTS in /etc/default/nfs-common , no documented
+ alternative is available on Xenial
summary: - gssd ignores RPCGSSDOPTS in /etc/default/nfs-common , no documented
- alternative is available on Xenial
+ gssd ignores RPCGSSDOPTS and GSSDOPTS in /etc/default/nfs-common , no
+ documented alternative is available on Xenial
Changed in nfs-utils (Ubuntu):
status: Invalid → New

/etc/systemd/system/rpc-gssd.service ("systemctl edit --full rpc-gssd.service") worked, but /etc/systemd/system/rpc-gssd.service.d/override.conf ("systemctl edit --full rpc-gssd.service") did not. This seems like a separate bug-- or perhaps there are restrictions on the override.conf file? The "edit" section in "man systemctl" makes it seem that it just needs to contain the changed line and a section heading.

Do you know how override.conf should work? It's not entirely clear what can be overridden and what can't from "Example 2. Overriding vendor settings" in "man systemd.unit". It seems to say that one can override (rather than just supplement) the settings in the system *.service file, but this doesn't seem to work, and the examples only show added values. Is this a documentation bug in systemd.unit(5), a bug in systemd, or a bug in the Ubuntu repackaging of systemd? (Or am I just missing something?)

Mikko Pesari (mpesari) wrote :

# cat /etc/systemd/system/rpc-gssd.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/sbin/rpc.gssd -your -options

# systemctl daemon-reload
# systemctl restart rpc-gssd.service

Mikko Pesari (mpesari) wrote :

Sorry, forgot to say it's documented in systemd.unit(5), Example 2.

Ah, as in this bit.
"""
Note that for drop-in files, if one wants to remove entries from a setting that
is parsed as a list (and is not a dependency), such as ConditionPathExists= (or
e.g. ExecStart= in service units), one needs to first clear the list before
re-adding all entries except the one that is to be removed. See below for an
example.
"""
Thanks, I'll update https://help.ubuntu.com/community/NFSv4Howto if I can (I'm getting a 500 error just now).

It turns out it's a locked ("Immutable") page. Do you have the rights to edit it, Mikko?

Mikko Pesari (mpesari) wrote :

Nope, looks like one needs to be a member of this group https://launchpad.net/~ubuntu-wiki-editors/ to edit pages. Send a request to join; I did, anyway :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers