exportfs always returns success status

Bug #1766126 reported by amk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

It is impossible to determine whether exportfs command failed or succeeded based on the exit status:

root@ver:~# exportfs asdf ; echo $?
exportfs: Invalid exporting option: asdf
0

user@ver:~$ exportfs ; echo $?
exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 (Permission denied)
0

Search did not reveal a duplicate bug but a similar issue was resolved upstream back in 2013:
https://bugzilla.redhat.com/show_bug.cgi?id=966237

root@ver:~# lsb_release -rd
Description: Ubuntu 16.04.4 LTS
Release: 16.04

root@ver:~# apt-cache policy nfs-utils
N: Unable to locate package nfs-utils
root@ver:~# apt-cache policy nfs-kernel-server
nfs-kernel-server:
  Installed: 1:1.2.8-9ubuntu12.1
  Candidate: 1:1.2.8-9ubuntu12.1

What is expected to happen: Command exits with status = 0 only in case of successful execution

What happens instead: Command exit status is 0 regardless of outcome.

Revision history for this message
Rodrigo Barbieri (rodrigo-barbieri2010) wrote :

This is no longer true as of 1:1.3.4-2.1ubuntu5.2 (bionic). Do you need this fix in xenial?

Revision history for this message
amk (9-launchpad-mikus-sk) wrote :

Personally, I am not waiting for fix in xenial anymore. The storage is now mounted to client directly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.