Bug 722431

Summary: YaST does not modify /etc/fstab when setting up a NFS client
Product: [openSUSE] openSUSE 12.1 Reporter: Steffen Eibicht <steffeneibicht>
Component: YaST2Assignee: E-mail List <bnc-team-screening>
Status: VERIFIED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: forgotten_UDlsMBNiEE, nfbrown
Version: Beta 1   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Steffen Eibicht 2011-10-06 05:09:03 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de-DE) AppleWebKit/533.3 (KHTML, like Gecko) konqueror/4.6.5 Safari/533.3

When ever a user sets up a NFS Client in YaST (openSUSE 11.3, 11.4 and 12.1), he provides all information about the NFS Server and all directories which should be accessed by the client. 
When the user is finished providing these informations, he/she wants to mount the shared directories which are available in the network (provided by the Server). 
But because YaST does not modify the file /etc/fstab automatically, a failure message pops up during the mount process  "shares cannot be mounted from /etc/fstab" or similar. 

So the user additionally needs to modify the /etc/fstab file manually, despite he already has provided all the necessary information for that in YaST while setting up the NFS client. 

Please make YaST to do this work for the user automatically!

Thanks!

Reproducible: Always

Steps to Reproduce:
1. setting up the server, specifying all shared directories
2. setting up the client, in YaST, failure message
3. modifying /etc/fstab (slightly grumpy...)
Actual Results:  
see description

Expected Results:  
setting up a NFS client in YaST and after finishing it, it should work without flaws and problems.
Comment 1 Neil Brown 2011-10-09 22:27:49 UTC
This should be assign to a YaST engineer, not an NFS engineer (i.e. not me), so I'm assigning it back to the screening team to be reassigned.

They will ask you to provide the full yast logs, so you may as well attach them now.

But I'm a bit confused about the sequence of events.

You are setting up 2 different computers - one as the server and one as the client - is that right?
And it is the /etc/fstab on the client that isn't getting set up correctly?

In the "steps to reproduce" you mention that when setting up the server you specify all the directories to share, but when setting up the client, you don't explicitly say that you tell it what filesystems to mount from which server.  I assume you are doing that?

Could you just explain in a bit more detail - possibly with examples - exactly what you are doing?  I'm guessing there is a step that you are missing because you don't realise it is needed.
Comment 2 Steffen Eibicht 2011-10-12 04:40:25 UTC
yes, I tried to set up two computers - one as a server and one as a client. And it is the /etc/fstab of the client which is not set up correctly.

In the description above I just forgot to mention that I of course tell the client which filesystems to mount from which server. 

So, I do the following:

1. setting up the server... creating a folder which should be shared, starting Yast --> NFS server... then in the first menu, I choose that the server should be started and the firewall port should be opened.
I leave the option "activate NFSv4" checked.

Then, in the next screen I choose "add directory" and choose the created directory. Then it will be exported. 
I leave the pop-up with "computer wildcard" and all the permissions as it is and just click "ok".
With that the server is set up (I assume)

2. setting up the client... I open Yast--> NFS client, then I search for computers in the network. Then I choose the directory on the server and a mount point on the client (I choosed /media). In the upper part of the Yast-Window, there are all information which directories on the server... permissions and so on. So I assumed that Yast got all the information for mounting the servers directory on the client. 
Then I check the options (firewall etc) and click "ok" and then the failure message pops up, that the client cannot mount the server directory from /etc/fstab

If it would be just a missed step, then I would be glad - also if you could give me a hint on it ;-)

Thanks!
Steffen
Comment 3 Neil Brown 2011-10-12 05:17:46 UTC
Thank you for all the details.  It really helps a lot!

I tried the sequence that you described, and YaST *did* modify /etc/fstab,
but it also produced exactly the message that you reported.

I suspect it actually did modify /etc/fstab for you too.

The reason YaST reports that message is that 
   /etc/init.d/nfs status
reports 'unused' instead of 'OK', due to a bug described in Bug #720376 ... which is unfortunately not public.

The required fix is below - you should be able to apply it by hand.

If you make that change, or install the update once it becomes available, YaST should work for you (I'll push the update out for 12.1 shortly).

--- /etc/init.d/nfs.orig	2011-07-01 23:12:55.000000000 +0200
+++ /etc/init.d/nfs	2011-10-06 10:25:06.000000000 +0200
@@ -56,7 +56,8 @@
     esac
     nfs=yes
     if test "$1" = status ; then
-	grep -qF "$what $where nfs" /proc/mounts && continue
+	grep -qF "$what $where nfs
+$what/ $where nfs" /proc/mounts && continue
         state=3
 	continue
     fi

(If this doesn't fix it, please reopen.  If it does, please change from 'RESOLVED' to 'CLOSED').
Comment 4 Bernhard Wiedemann 2011-10-12 06:00:34 UTC
This is an autogenerated message for OBS integration:
This bug (722431) was mentioned in
https://build.opensuse.org/request/show/87463 Factory / nfs-utils
Comment 5 Martin Vidner 2011-10-12 15:38:54 UTC
*** Bug 723291 has been marked as a duplicate of this bug. ***
Comment 6 Steffen Eibicht 2011-10-18 01:21:56 UTC
Hi,

thanks for the fast response!

It works now, after all new updates were installed on both systems.