Skip to content

Update nfs utils #986

Merged
merged 18 commits into from
Jan 17, 2019
Merged

Update nfs utils #986

merged 18 commits into from
Jan 17, 2019

Conversation

donald
Copy link
Collaborator

@donald donald commented Dec 27, 2018

This will update our nfsd userspace tools, which would be needed for kerberos nfs but may be a good idea anyway. Supplied script scripts/update-nfs-utils will apply all changes to the currents system.

Running this script will trigger the nfsd grace period, which might block client writes for 90 seconds plus something. Aside from the 90 second freeze it can be done on a live nfs server.

Notes:

  • We disable nfs v3 (because we use v4 only) and statd (only required by v3).
  • We install two new dependencies (keyutils and libtirpc) and remove two obsolete ones (libnfsidmap , rpcinfo).
  • portmapper is replaced by rpcbind.
  • We remove the amd automounter, which is not used and will probably not work without nfs v3.

kerberos support is not complete and things could be made nicer (perhaps putting the unit files into the bee files), but I'd like to merge as is a a basis for further improvements.

@donald donald force-pushed the update-nfs-utils branch 8 times, most recently from 123d3d7 to ba0bb3b Compare December 29, 2018 13:24
The tool rpcinfo will be provided by package rpcbind.

Remove this package.
The portmapper service will be provided by the rpcbind daemon from the
package rpcbind.

Remove this package.
Create new be0 file from template.

Import mee_build procedure from previous bee file.

Ignore these special settings from the previous bee file:

   * `ARCH=noarch` (we don't currently care about ARCH)
   * `B=${S}` (not required)
   * definitions of mee_patch(),  mee_configure() and mee-intall() (all noop)
The Makefile installs into $PREFIX/etc, which doesn't work well with
our current default prefix of /usr.

Set PREFIX to empty.
rpcbind will be socket activated by default. However, if the daemon
is started manually, it requires one of the aliases "portmapper" or
"rpcbind" to be available in /etc/services.

Add service aliases for udp/tcp port 111.
The package rpcbind is a replacement for the older portmapper and
rpcinfo packages. It is required by current nfs-utils package
(rpc.mountd).

Homepage: https://linux-nfs.org/wiki/index.php/Main_Page
Repository: git://linux-nfs.org/~steved/rpcbind

This package installs systemd socket and unit files for socket
activation. If the daemon is started manually, however, it requires
the alias "portmapper" or "rpcbind" to be available in /etc/services,
e.g.:

    sunrpc          111/tcp portmapper rpcbind  # SUN Remote Procedure Call
    sunrpc          111/udp portmapper rpcbind  # SUN Remote Procedure Call

We don't need to add dependencies for the users of this service
(nis.service,i nfsd.service) because these have an After= dependency
on basic.target by DefaultDependencies. basic.target has an After=
dependency on sockets.target.

We don't need to start the service manually, because it is socket
activated. The rpcbind.socket unit needs to be enabled, however.

Create bee file from template without changes.
This enables the -w option, which is used in the systemd service file
supplied by this package.
The libtirpc package contains libraries that support programs that use
the Remote Procedure Call (RPC) API. It replaces the RPC, but not the
NIS library entries that used to be in glibc.

Required by nfs-utils.

Create bee file from template without changes.
Keyutils is a set of utilities for managing the key retention facility
in the kernel, which can be used by filesystems, block devices and more
to gain and retain the authorization and encryption keys required to
perform secure operations.

Required by nfs-utils.

Create bee file from template without changes.
The library /usr/lib/libnfsidmap.so will be provided by the nfs-utils
package. Remove this package.
We need newer versions of the tools (mountd, exportfs) to support
kerberos authentication.

Create bee file for new version from template without changes.

Requires libtirpc and keyutils.
Without build_in_sourcedir the build fails, because -I is used with
relative paths ( `-I../../support/include` ) :

    gcc -DHAVE_CONFIG_H -I.  -I/scratch/local/bee-root/nfs-utils/nfs-utils-2.3.3-0/source/support/export -I../../support/include  -I/usr/include/tirpc   -D_GNU_SOURCE -pipe -Wall  -Wextra  -Werror=strict-prototypes  -Werror=missing-prototypes -Werror=missing-declarations  -Werror=format=2  -Werror=undef -Werror=missing-include-dirs  -Werror=strict-aliasing=2 -Werror=init-self  -Werror=implicit-function-declaration -Werror=return-type  -Werror=switch  -Werror=overflow -Werror=parentheses  -Werror=aggregate-return  -Werror=unused-result -fno-strict-aliasing  -Werror=format-overflow=2 -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -g -O2 -MT client.o -MD -MP -MF .deps/client.Tpo -c -o client.o
    /scratch/local/bee-root/nfs-utils/nfs-utils-2.3.3-0/source/support/export/client.c
    /scratch/local/bee-root/nfs-utils/nfs-utils-2.3.3-0/source/support/export/client.c:22:10:
    fatal error: sockaddr.h: No such file or directory
    #include "sockaddr.h"
              ^~~~~~~~~~~~
    compilation terminated.

Add build_in_sourcedir.
The daemon rpc.svcgssd for server-side kerberos authentication is only
build on request.

Add configure flag to build the daemon.
@donald
Copy link
Collaborator Author

donald commented Jan 16, 2019

tested on theinternet and chimichangas

Copy link
Collaborator

@pmenzel pmenzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on keineahnung.

scripts/update-nfs-utils.sh Outdated Show resolved Hide resolved
scripts/update-nfs-utils.sh Outdated Show resolved Hide resolved
scripts/update-nfs-utils.sh Show resolved Hide resolved
We use nfs version 4 only. Disable unused version 3, to make things
simpler.
This is the amd automounter. We will not be using it again and
it might not even work if we restrict ourself to nfs4.

Remove this package.

If we find scripts using `pawd` from this package, they need to be fixed
to use just `pwd`.
@pmenzel pmenzel merged commit eec4677 into master Jan 17, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants