[PATCH 0/2] Prefer generator to static systemd units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

in Debian and Ubuntu, the configuration file /etc/nfs.conf is only
placed on disk in the postinst script[1]. In this scenario it's possible
to have the nfs-common generators run before /etc/nfs.conf exists[2],
via another package's postinst calling systemctl daemon-reload. Since
there is no /etc/nfs.conf yet, defaults are assumed and the generators
exit silently, and the corresponding static units are used.

But in Debian/Ubuntu, the rpc_pipefs directory is /run/rpc_pipefs, and
not the one specified in the static units, and thus we get it mounted in
the wrong directory.

It seems best to always rely on the generators, as they will always be
able to produce the correct target and mount units.

For reference, this was first brought up in this thread[3].

Producing an upstream set of patches was a bit confusing, since these
systemd units are highly distro dependent. They are not even installed
via `make install` because of this, so I have more confidence in the
first patch of the series.

I produced a Debian package with these two patches applied on top of
Debian's 2.6.3[6], and ran the DEP8 tests of nfs-utils[4] and autofs[5],
which exercise some simple v3 and v4 mounts, with and without kerberos.
These tests passed[7][8] (ephemeral links, will be gone once the PPA is
destroyed).

1. https://git.launchpad.net/ubuntu/+source/nfs-utils/tree/debian/nfs-common.postinst?h=applied/ubuntu/devel#n6
2. https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1971935/comments/22
3. https://marc.info/?l=linux-nfs&m=165729895515639&w=4
4. https://git.launchpad.net/ubuntu/+source/nfs-utils/tree/debian/tests?h=applied/ubuntu/lunar-devel
5. https://git.launchpad.net/ubuntu/+source/autofs/tree/debian/tests?h=applied/ubuntu/lunar-devel
6. https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+ref/upstream-nfs-utils-test
7. https://autopkgtest.ubuntu.com/results/autopkgtest-mantic-ahasenack-nfs-upstream-test/mantic/amd64/a/autofs/20230728_135149_0895b@/log.gz
8. https://autopkgtest.ubuntu.com/results/autopkgtest-mantic-ahasenack-nfs-upstream-test/mantic/amd64/n/nfs-utils/20230728_150122_3ef18@/log.gz

Andreas Hasenack (2):
  Always run the rpc_pipefs generator
  Use the generated units instead of static ones

 configure.ac                            |  8 +-------
 systemd/Makefile.am                     |  5 -----
 systemd/rpc-pipefs-generator.c          |  3 ---
 systemd/rpc_pipefs.target               |  3 ---
 systemd/rpc_pipefs.target.in            |  3 ---
 systemd/var-lib-nfs-rpc_pipefs.mount    | 10 ----------
 systemd/var-lib-nfs-rpc_pipefs.mount.in | 10 ----------
 7 files changed, 1 insertion(+), 41 deletions(-)
 delete mode 100644 systemd/rpc_pipefs.target
 delete mode 100644 systemd/rpc_pipefs.target.in
 delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount
 delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount.in

-- 
2.39.2



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux