RPCSVCGSSDOPT is ignored by boot script

Bug #1614261 reported by Philippe Clérié
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In /etc/default/nfs-kernel-server, any value assigned to RPCSVCGSSOPTS is ignored by the boot scripts.

On cold boot or reboot a value assigned to RPCMOUNTDOPTS is picked up, but on subsequent restarts using *systemctl restart* it is ignored.

It was suggested on IRC to check /run/sysconfig/nfs-utils. The strange thing there is that the file is created on boot and subsequently ignored. To confirm:

- Boot. /run/sysconfig/nfs-utils is present.
- Delete /run/sysconfig/nfs-utils
- Restart nfs-kernel-server. nfs-utils is not recreated.

Or you can change one of those options, then restart nfs-kernel-server. nfs-utils will not have changed.

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: nfs-kernel-server 1:1.2.8-9ubuntu12
ProcVersionSignature: Ubuntu 4.4.0-34.53-generic 4.4.15
Uname: Linux 4.4.0-34-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Wed Aug 17 15:51:55 2016
InstallationDate: Installed on 2016-08-16 (0 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160224)
ProcEnviron:
 TERM=xterm-256color
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 XDG_RUNTIME_DIR=<set>
SourcePackage: nfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Philippe Clérié (pclerie) wrote :
Revision history for this message
Philippe Clérié (pclerie) wrote :

At least a work around:

--- /lib/systemd/system/rpc-svcgssd.service.orig 2016-08-17 16:20:10.983078745 -0500
+++ /lib/systemd/system/rpc-svcgssd.service 2016-08-17 16:20:44.838526911 -0500
@@ -14,4 +14,4 @@
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
 Type=forking
-ExecStart=/usr/sbin/rpc.svcgssd $SVCGSSDARGS
+ExecStart=/usr/sbin/rpc.svcgssd $RPCSVCGSSDARGS

Now the -vvv appears in the command with ps -ef.

But it looks like much ado about nothing: where are the logs? I don't see anything in syslog or auth.log and there are no new log files...

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Try journalctl -u rpc-svcgssd.service to find logs

Thanks

Revision history for this message
Philippe Clérié (pclerie) wrote : Re: [Bug 1614261] Re: RPCSVCGSSDOPT is ignored by boot script

On 08/23/2016 12:41 PM, Seth Arnold wrote:
> Try journalctl -u rpc-svcgssd.service to find logs
>
> Thanks
>
Noted. Thanks.

--
Philippe

------
The trouble with common sense it that it is so uncommon.
<Anonymous>

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nfs-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

What is "RPCSVCGSSDOPT"?

When answered please set status back to "confirmed". Thank you.

summary: - RPCSVCGSSDOPT is ignored by boot script
+ RPCSVCGSSDOPT util is ignored by boot script
summary: - RPCSVCGSSDOPT util is ignored by boot script
+ RPCSVCGSSDOPT is ignored by boot script
Changed in nfs-utils (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Tom H (tomh0665) wrote :

There's a mistake in "/usr/lib/systemd/scripts/nfs-utils_env.sh" because it has an extra "RPC" in "RPCSVCGSSDARGS" in

echo RPCSVCGSSDARGS=\"$RPCSVCGSSDOPTS\"

when the corresponding ExecStart line has

/usr/sbin/rpc.svcgssd $SVCGSSDARGS

So setting "RPCSVCGSSDOPTS=something" in "/etc/default/nfs-kernel-server" isn't carried over to the systemd unit.

That's why comment #2 has

-ExecStart=/usr/sbin/rpc.svcgssd $SVCGSSDARGS
+ExecStart=/usr/sbin/rpc.svcgssd $RPCSVCGSSDARGS

but it's the wrong fix because "SVCGSSDARGS" is the upstream default whereas 'RPCSVCGSSDARGS=\"$RPCSVCGSSDOPTS\"' is an Ubuntu script.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nfs-utils (Ubuntu) because there has been no activity for 60 days.]

Changed in nfs-utils (Ubuntu):
status: Incomplete → Expired
Changed in nfs-utils (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Markus Kuhn (markus-kuhn) wrote :

I can confirm the diagnosis in #7 and suggest the attached patch as a fix.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch for /usr/lib/systemd/scripts/nfs-utils_env.sh" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I also prefer the fix from comment #9.

I'll mark this bug as a duplicate of bug #1616123, but take that patch.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.