All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Prefer generator to static systemd units
@ 2023-07-28 16:06 Andreas Hasenack
  2023-09-05 15:09 ` Salvatore Bonaccorso
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Hasenack @ 2023-07-28 16:06 UTC (permalink / raw)
  To: linux-nfs

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-22  1:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 16:06 [PATCH 0/2] Prefer generator to static systemd units Andreas Hasenack
2023-09-05 15:09 ` Salvatore Bonaccorso
2023-11-21 19:48   ` Salvatore Bonaccorso
2023-11-22  1:17     ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.