From 8de6133880278bfaf74d39ab101e38b34350a322 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 26 Apr 2017 12:23:57 -0400 Subject: [PATCH] systemd: Afters are also needed for the Wants=network-online.target (bz 1419351) Signed-off-by: Steve Dickson --- nfs-utils-2.1.1-network-online.patch | 66 ++++++++++++++++++++++++++++ nfs-utils-2.1.1-nfs-config.patch | 44 +++++++++---------- nfs-utils.spec | 7 ++- 3 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 nfs-utils-2.1.1-network-online.patch diff --git a/nfs-utils-2.1.1-network-online.patch b/nfs-utils-2.1.1-network-online.patch new file mode 100644 index 0000000..0b01e16 --- /dev/null +++ b/nfs-utils-2.1.1-network-online.patch @@ -0,0 +1,66 @@ +commit 09e5c6c2a3f8eac91d5353e6d4ff6aee7757ab08 +Author: Steve Dickson +Date: Mon Apr 24 11:25:39 2017 -0400 + + systemd: Afters are also needed for the Wants=network-online.target + + Commit 9d4fc3fb added Wants=network-online.target which + is not enough to ensure the network is completely up + before the NFS server is started. After=network-online.target + is also needed. + + Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1419351 + + Signed-off-by: Steve Dickson + +diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service +index fec0399..e8ece53 100644 +--- a/systemd/nfs-mountd.service ++++ b/systemd/nfs-mountd.service +@@ -4,6 +4,7 @@ DefaultDependencies=no + Requires=proc-fs-nfsd.mount + Wants=network-online.target + After=proc-fs-nfsd.mount ++After=network-online.target local-fs.target + After=rpcbind.socket + BindsTo=nfs-server.service + +diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service +index e6b8f58..136552b 100644 +--- a/systemd/nfs-server.service ++++ b/systemd/nfs-server.service +@@ -7,7 +7,7 @@ Wants=rpcbind.socket network-online.target + Wants=rpc-statd.service nfs-idmapd.service + Wants=rpc-statd-notify.service + +-After= local-fs.target ++After= network-online.target local-fs.target + After= proc-fs-nfsd.mount rpcbind.socket nfs-mountd.service + After= nfs-idmapd.service rpc-statd.service + Before= rpc-statd-notify.service +diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service +index f54d4c5..687fe31 100644 +--- a/systemd/rpc-statd-notify.service ++++ b/systemd/rpc-statd-notify.service +@@ -2,7 +2,7 @@ + Description=Notify NFS peers of a restart + DefaultDependencies=no + Wants=network-online.target +-After=local-fs.target network.target nss-lookup.target ++After=local-fs.target network-online.target nss-lookup.target + + # if we run an nfs server, it needs to be running before we + # tell clients that it has restarted. +diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service +index 8cef022..f41ae20 100644 +--- a/systemd/rpc-statd.service ++++ b/systemd/rpc-statd.service +@@ -4,7 +4,7 @@ DefaultDependencies=no + Conflicts=umount.target + Requires=nss-lookup.target rpcbind.socket + Wants=network-online.target +-After=nss-lookup.target rpcbind.socket ++After=network-online.target nss-lookup.target rpcbind.socket + + PartOf=nfs-utils.service + diff --git a/nfs-utils-2.1.1-nfs-config.patch b/nfs-utils-2.1.1-nfs-config.patch index 5bfd7fc..28e9672 100644 --- a/nfs-utils-2.1.1-nfs-config.patch +++ b/nfs-utils-2.1.1-nfs-config.patch @@ -1,6 +1,6 @@ diff -up nfs-utils-2.1.1/configure.ac.orig nfs-utils-2.1.1/configure.ac --- nfs-utils-2.1.1/configure.ac.orig 2017-01-12 10:21:39.000000000 -0500 -+++ nfs-utils-2.1.1/configure.ac 2017-04-09 15:30:50.812286349 -0400 ++++ nfs-utils-2.1.1/configure.ac 2017-04-26 12:22:25.320882445 -0400 @@ -518,6 +518,11 @@ AC_SUBST([AM_CFLAGS], ["$my_am_cflags"]) # Make sure that $ACLOCAL_FLAGS are used during a rebuild AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"]) @@ -22,8 +22,8 @@ diff -up nfs-utils-2.1.1/configure.ac.orig nfs-utils-2.1.1/configure.ac linux-nfs/Makefile support/Makefile diff -up nfs-utils-2.1.1/systemd/Makefile.am.orig nfs-utils-2.1.1/systemd/Makefile.am ---- nfs-utils-2.1.1/systemd/Makefile.am.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/Makefile.am 2017-04-09 15:30:50.813286345 -0400 +--- nfs-utils-2.1.1/systemd/Makefile.am.orig 2017-04-26 12:21:44.759035047 -0400 ++++ nfs-utils-2.1.1/systemd/Makefile.am 2017-04-26 12:22:25.321882441 -0400 @@ -6,6 +6,7 @@ unit_files = \ nfs-client.target \ rpc_pipefs.target \ @@ -33,8 +33,8 @@ diff -up nfs-utils-2.1.1/systemd/Makefile.am.orig nfs-utils-2.1.1/systemd/Makefi nfs-server.service \ nfs-utils.service \ diff -up nfs-utils-2.1.1/systemd/nfs-blkmap.service.orig nfs-utils-2.1.1/systemd/nfs-blkmap.service ---- nfs-utils-2.1.1/systemd/nfs-blkmap.service.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/nfs-blkmap.service 2017-04-09 15:30:50.813286345 -0400 +--- nfs-utils-2.1.1/systemd/nfs-blkmap.service.orig 2017-04-26 12:21:44.759035047 -0400 ++++ nfs-utils-2.1.1/systemd/nfs-blkmap.service 2017-04-26 12:22:25.321882441 -0400 @@ -10,7 +10,8 @@ PartOf=nfs-utils.service [Service] Type=forking @@ -46,8 +46,8 @@ diff -up nfs-utils-2.1.1/systemd/nfs-blkmap.service.orig nfs-utils-2.1.1/systemd [Install] WantedBy=nfs-client.target diff -up nfs-utils-2.1.1/systemd/nfs-config.service.in.orig nfs-utils-2.1.1/systemd/nfs-config.service.in ---- nfs-utils-2.1.1/systemd/nfs-config.service.in.orig 2017-04-09 15:30:50.813286345 -0400 -+++ nfs-utils-2.1.1/systemd/nfs-config.service.in 2017-04-09 15:30:50.813286345 -0400 +--- nfs-utils-2.1.1/systemd/nfs-config.service.in.orig 2017-04-26 12:22:25.322882438 -0400 ++++ nfs-utils-2.1.1/systemd/nfs-config.service.in 2017-04-26 12:22:25.322882438 -0400 @@ -0,0 +1,13 @@ +[Unit] +Description=Preprocess NFS configuration @@ -63,8 +63,8 @@ diff -up nfs-utils-2.1.1/systemd/nfs-config.service.in.orig nfs-utils-2.1.1/syst +RemainAfterExit=no +ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh diff -up nfs-utils-2.1.1/systemd/nfs-idmapd.service.orig nfs-utils-2.1.1/systemd/nfs-idmapd.service ---- nfs-utils-2.1.1/systemd/nfs-idmapd.service.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/nfs-idmapd.service 2017-04-09 15:30:50.813286345 -0400 +--- nfs-utils-2.1.1/systemd/nfs-idmapd.service.orig 2017-04-26 12:21:44.759035047 -0400 ++++ nfs-utils-2.1.1/systemd/nfs-idmapd.service 2017-04-26 12:22:25.322882438 -0400 @@ -6,6 +6,10 @@ After=rpc_pipefs.target local-fs.target BindsTo=nfs-server.service @@ -78,9 +78,9 @@ diff -up nfs-utils-2.1.1/systemd/nfs-idmapd.service.orig nfs-utils-2.1.1/systemd -ExecStart=/usr/sbin/rpc.idmapd +ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS diff -up nfs-utils-2.1.1/systemd/nfs-mountd.service.orig nfs-utils-2.1.1/systemd/nfs-mountd.service ---- nfs-utils-2.1.1/systemd/nfs-mountd.service.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/nfs-mountd.service 2017-04-09 15:30:50.814286341 -0400 -@@ -7,6 +7,10 @@ After=network.target local-fs.target +--- nfs-utils-2.1.1/systemd/nfs-mountd.service.orig 2017-04-26 12:21:44.765035024 -0400 ++++ nfs-utils-2.1.1/systemd/nfs-mountd.service 2017-04-26 12:22:25.323882434 -0400 +@@ -8,6 +8,10 @@ After=network-online.target local-fs.tar After=rpcbind.socket BindsTo=nfs-server.service @@ -93,8 +93,8 @@ diff -up nfs-utils-2.1.1/systemd/nfs-mountd.service.orig nfs-utils-2.1.1/systemd -ExecStart=/usr/sbin/rpc.mountd +ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS diff -up nfs-utils-2.1.1/systemd/nfs-server.service.orig nfs-utils-2.1.1/systemd/nfs-server.service ---- nfs-utils-2.1.1/systemd/nfs-server.service.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/nfs-server.service 2017-04-09 15:30:50.814286341 -0400 +--- nfs-utils-2.1.1/systemd/nfs-server.service.orig 2017-04-26 12:21:44.765035024 -0400 ++++ nfs-utils-2.1.1/systemd/nfs-server.service 2017-04-26 12:22:25.323882434 -0400 @@ -16,11 +16,16 @@ Before= rpc-statd-notify.service Wants=auth-rpcgss-module.service After=rpc-gssd.service gssproxy.service rpc-svcgssd.service @@ -115,7 +115,7 @@ diff -up nfs-utils-2.1.1/systemd/nfs-server.service.orig nfs-utils-2.1.1/systemd ExecStopPost=/usr/sbin/exportfs -f diff -up nfs-utils-2.1.1/systemd/README.orig nfs-utils-2.1.1/systemd/README --- nfs-utils-2.1.1/systemd/README.orig 2017-01-12 10:21:39.000000000 -0500 -+++ nfs-utils-2.1.1/systemd/README 2017-04-09 15:30:50.814286341 -0400 ++++ nfs-utils-2.1.1/systemd/README 2017-04-26 12:22:25.324882430 -0400 @@ -19,8 +19,8 @@ by a suitable 'preset' setting: can work (if no type is given, ".service" is assumed). @@ -153,8 +153,8 @@ diff -up nfs-utils-2.1.1/systemd/README.orig nfs-utils-2.1.1/systemd/README rpc.gssd and rpc.svcgssd are assumed to be needed if /etc/krb5.keytab is present. diff -up nfs-utils-2.1.1/systemd/rpc-gssd.service.in.orig nfs-utils-2.1.1/systemd/rpc-gssd.service.in ---- nfs-utils-2.1.1/systemd/rpc-gssd.service.in.orig 2017-04-09 15:29:49.687515444 -0400 -+++ nfs-utils-2.1.1/systemd/rpc-gssd.service.in 2017-04-09 15:30:50.814286341 -0400 +--- nfs-utils-2.1.1/systemd/rpc-gssd.service.in.orig 2017-04-26 12:21:44.760035043 -0400 ++++ nfs-utils-2.1.1/systemd/rpc-gssd.service.in 2017-04-26 12:22:25.324882430 -0400 @@ -9,6 +9,11 @@ ConditionPathExists=@_sysconfdir@/krb5.k PartOf=nfs-utils.service @@ -169,8 +169,8 @@ diff -up nfs-utils-2.1.1/systemd/rpc-gssd.service.in.orig nfs-utils-2.1.1/system -ExecStart=/usr/sbin/rpc.gssd +ExecStart=/usr/sbin/rpc.gssd $RPCGSSDARGS diff -up nfs-utils-2.1.1/systemd/rpc-statd-notify.service.orig nfs-utils-2.1.1/systemd/rpc-statd-notify.service ---- nfs-utils-2.1.1/systemd/rpc-statd-notify.service.orig 2017-01-12 10:21:39.000000000 -0500 -+++ nfs-utils-2.1.1/systemd/rpc-statd-notify.service 2017-04-09 15:30:50.814286341 -0400 +--- nfs-utils-2.1.1/systemd/rpc-statd-notify.service.orig 2017-04-26 12:21:44.765035024 -0400 ++++ nfs-utils-2.1.1/systemd/rpc-statd-notify.service 2017-04-26 12:22:25.325882426 -0400 @@ -10,6 +10,10 @@ After=nfs-server.service PartOf=nfs-utils.service @@ -184,9 +184,9 @@ diff -up nfs-utils-2.1.1/systemd/rpc-statd-notify.service.orig nfs-utils-2.1.1/s -ExecStart=-/usr/sbin/sm-notify +ExecStart=-/usr/sbin/sm-notify $SMNOTIFYARGS diff -up nfs-utils-2.1.1/systemd/rpc-statd.service.orig nfs-utils-2.1.1/systemd/rpc-statd.service ---- nfs-utils-2.1.1/systemd/rpc-statd.service.orig 2017-01-12 10:21:39.000000000 -0500 -+++ nfs-utils-2.1.1/systemd/rpc-statd.service 2017-04-09 15:30:50.815286338 -0400 -@@ -7,8 +7,12 @@ After=network.target nss-lookup.target r +--- nfs-utils-2.1.1/systemd/rpc-statd.service.orig 2017-04-26 12:21:44.765035024 -0400 ++++ nfs-utils-2.1.1/systemd/rpc-statd.service 2017-04-26 12:22:25.325882426 -0400 +@@ -8,8 +8,12 @@ After=network-online.target nss-lookup.t PartOf=nfs-utils.service diff --git a/nfs-utils.spec b/nfs-utils.spec index 3242566..3df5c1e 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -16,6 +16,7 @@ Source4: lockd.conf Source5: 24-nfs-server.conf Patch001: nfs-utils-2.1.2-rc2.patch +Patch002: nfs-utils-2.1.1-network-online.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -75,6 +76,7 @@ This package also contains the mount.nfs and umount.nfs program. %setup -q %patch001 -p1 +%patch002 -p1 %patch100 -p1 %patch101 -p1 @@ -288,8 +290,9 @@ fi /sbin/umount.nfs4 %changelog -* Mon Apr 24 2017 Steve Dickson 2.1.1-4.rc2 +* Wed Apr 26 2017 Steve Dickson 2.1.1-5.rc2 - Conditionally restart gssproxy now that config file is installed (bz 1440885) +- systemd: Afters are also needed for the Wants=network-online.target (bz 1419351) * Mon Apr 10 2017 Steve Dickson 2.1.1-4.rc2 - Updated to the latest RC release: nfs-utils-2-1-2-rc2 (bz 1419351) @@ -313,7 +316,7 @@ fi * Mon Dec 19 2016 Miro Hronok - 1:1.3.4-1.rc3.1 - Rebuild for Python 3.6 -* Fri Nov 25 2016 Steve Dickson 1.3.4-1.rc3 +* Wed Nov 23 2016 Steve Dickson 1.3.4-1.rc3 - Updated to the latest RC release: nfs-utils-1-3-5-rc3 * Thu Aug 25 2016 Steve Dickson 1.3.4-1.rc2