Skip to contentSkip to conversation

exportfs: Ingnore export failures in nfs-server.serivce unit

PATCH In review Steve Dickson 1 participant 2 messages Dec 10, 2020 – Dec 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exportfs: Ingnore export failures in nfs-server.serivce unit

With some recent commits, exportfs will continue on trying to export filesystems even when an entry is invalid or does not exist, but will still have a non-zero exit to report the error.

This situation should not stop the nfs-server service from comingup so nfs-server.service file should ignore these types of failures

---
 systemd/nfs-server.service | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
systemd/nfs-server.service +2 -2
index 06c1adb..b432f91 100644
@@ -21,13 +21,13 @@ After=rpc-gssd.service gssproxy.service rpc-svcgssd.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=/usr/sbin/exportfs -r
+ExecStartPre=-/usr/sbin/exportfs -r
 ExecStart=/usr/sbin/rpc.nfsd
 ExecStop=/usr/sbin/rpc.nfsd 0
 ExecStopPost=/usr/sbin/exportfs -au
 ExecStopPost=/usr/sbin/exportfs -f
 
-ExecReload=/usr/sbin/exportfs -r
+ExecReload=-/usr/sbin/exportfs -r
 
 [Install]
 WantedBy=multi-user.target
Signature · 1 line
2.28.0
#1 lore raw
Quoted 10 lines · Steve Dickson

With some recent commits, exportfs will continue on trying to export filesystems even when an entry is invalid or does not exist, but will still have a non-zero exit to report the error.

This situation should not stop the nfs-server service from comingup so nfs-server.service file should ignore these types of failures

Committed. (tag: nfs-utils-2-5-3-rc2)

steved.

Quoted 25 lines
---
 systemd/nfs-server.service | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
systemd/nfs-server.service +2 -2
index 06c1adb..b432f91 100644
@@ -21,13 +21,13 @@ After=rpc-gssd.service gssproxy.service rpc-svcgssd.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=/usr/sbin/exportfs -r
+ExecStartPre=-/usr/sbin/exportfs -r
 ExecStart=/usr/sbin/rpc.nfsd
 ExecStop=/usr/sbin/rpc.nfsd 0
 ExecStopPost=/usr/sbin/exportfs -au
 ExecStopPost=/usr/sbin/exportfs -f
 
-ExecReload=/usr/sbin/exportfs -r
+ExecReload=-/usr/sbin/exportfs -r
 
 [Install]
 WantedBy=multi-user.target