Bug 763796 (GLUSTER-2064)

Summary: NFS options are removed upon glusterd restart
Product: [Community] GlusterFS Reporter: Jacob Shucart <jacob>
Component: nfsAssignee: Gaurav <ggangalw>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.1.0CC: divya, gluster-bugs, mxhess, sac, saurabh, shehjart, vijay, vs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: nfs
Documentation: DA CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 763475    

Description Jacob Shucart 2010-11-08 16:11:44 UTC
Anything you add or modify in /etc/glusterd/nfs/nfs-server.vol gets removed when /etc/init.d/glusterd restart happens.  Unless we provide a way inside of Glsuter to specify options for the NFS server or to add non-Gluster directories to NFS export then we should not overwrite changes made to /etc/glusterd/nfs/nfs-server.vol

Comment 1 Shehjar Tikoo 2010-12-20 03:18:53 UTC
Generally, the feature requests all nfs options to be supported through the CLI.

Comment 2 Shehjar Tikoo 2010-12-20 03:19:29 UTC
*** Bug 2239 has been marked as a duplicate of this bug. ***

Comment 3 Matt 2011-02-06 14:03:59 UTC
Will this bug be moved to 3.1.3 since 3.1.2 is out already and this issue is unresolved?

Comment 4 Shehjar Tikoo 2011-02-09 06:25:39 UTC
Kaushik, will the patch be available for 3.1.3?

Comment 5 Anand Avati 2011-03-01 19:02:26 UTC
PATCH: http://patches.gluster.com/patch/6315 in master (CLI : NFS persistent local/global options.)

Comment 6 Saurabh 2011-03-07 09:59:53 UTC
Gaurav,


   Need to know about the expected behaviour of these options for verfiying this bug, also need to know whether all of them are global or local,


+        {"nfs.enable-ino32",                     "nfs/server",                "nfs.enable-ino32", NULL, GLOBAL_DOC},
+        {"nfs.export-dirs",                      "nfs/server",                "nfs3.export-dirs", NULL, GLOBAL_DOC},
+        {"nfs.export-volumes",                   "nfs/server",                "nfs3.export-volumes", NULL, GLOBAL_DOC},
+        {"nfs.addr-namelookup",                  "nfs/server",                "rpc-auth.addr.namelookup", NULL, GLOBAL_DOC},
+        {"nfs.dynamic-volumes",                  "nfs/server",                "nfs.dynamic-volumes", NULL, GLOBAL_DOC},
+        {"nfs.register-with-portmap",            "nfs/server",                "rpc.register-with-portmap", NULL, GLOBAL_DOC},
+        {"nfs.port",                             "nfs/server",                "nfs.port", NULL, GLOBAL_DOC},
+
+        {"nfs.rpc-auth-unix",                    "nfs/server",                "!nfs.rpc-auth-auth-unix", NULL, DOC},
+        {"nfs.rpc-auth-null",                    "nfs/server",                "!nfs.rpc-auth-auth-null", NULL, DOC},
+        {"nfs.rpc-auth-allow",                   "nfs/server",                "!nfs.rpc-auth.addr.allow", NULL, DOC},
+        {"nfs.rpc-auth-reject",                  "nfs/server",                "!nfs.rpc-auth.addr.reject", NULL, DOC},
+        {"nfs.ports-insecure",                   "nfs/server",                "!nfs.auth.ports.insecure", NULL, DOC},
+
+        {"nfs.trusted-sync",                     "nfs/server",                "!nfs-trusted-sync", NULL, DOC},
+        {"nfs.trusted-write",                    "nfs/server",                "!nfs-trusted-write", NULL, DOC},
+        {"nfs.volume-access",                    "nfs/server",                "!nfs-volume-access", NULL, DOC},
+        {"nfs.export-dir",                       "nfs/server",                "!nfs-export-dir", NULL, DOC}

Comment 7 Gaurav 2011-03-07 10:14:04 UTC
Options with type GLOBAL_DOC are global options and options with type DOC are local options.
You can set these options using normal volume set command.
For global options expected behaviour is, it should set that option for all the volumes irrespective of volume name in volume set command.
You can check volume info after volume set to verify.

Comment 8 Shehjar Tikoo 2011-03-08 03:37:35 UTC
Saurabh, see xlators/nfs/server/src/nfs.c. The options are documented at the end of the file. If the text there is not clear, ask me and I'll take you through it.

(In reply to comment #6)
> Gaurav,
> 
> 
>    Need to know about the expected behaviour of these options for verfiying
> this bug, also need to know whether all of them are global or local,
> 
> 
> +        {"nfs.enable-ino32",                     "nfs/server",               
> "nfs.enable-ino32", NULL, GLOBAL_DOC},
> +        {"nfs.export-dirs",                      "nfs/server",               
> "nfs3.export-dirs", NULL, GLOBAL_DOC},
> +        {"nfs.export-volumes",                   "nfs/server",               
> "nfs3.export-volumes", NULL, GLOBAL_DOC},
> +        {"nfs.addr-namelookup",                  "nfs/server",               
> "rpc-auth.addr.namelookup", NULL, GLOBAL_DOC},
> +        {"nfs.dynamic-volumes",                  "nfs/server",               
> "nfs.dynamic-volumes", NULL, GLOBAL_DOC},
> +        {"nfs.register-with-portmap",            "nfs/server",               
> "rpc.register-with-portmap", NULL, GLOBAL_DOC},
> +        {"nfs.port",                             "nfs/server",               
> "nfs.port", NULL, GLOBAL_DOC},
> +
> +        {"nfs.rpc-auth-unix",                    "nfs/server",               
> "!nfs.rpc-auth-auth-unix", NULL, DOC},
> +        {"nfs.rpc-auth-null",                    "nfs/server",               
> "!nfs.rpc-auth-auth-null", NULL, DOC},
> +        {"nfs.rpc-auth-allow",                   "nfs/server",               
> "!nfs.rpc-auth.addr.allow", NULL, DOC},
> +        {"nfs.rpc-auth-reject",                  "nfs/server",               
> "!nfs.rpc-auth.addr.reject", NULL, DOC},
> +        {"nfs.ports-insecure",                   "nfs/server",               
> "!nfs.auth.ports.insecure", NULL, DOC},
> +
> +        {"nfs.trusted-sync",                     "nfs/server",               
> "!nfs-trusted-sync", NULL, DOC},
> +        {"nfs.trusted-write",                    "nfs/server",               
> "!nfs-trusted-write", NULL, DOC},
> +        {"nfs.volume-access",                    "nfs/server",               
> "!nfs-volume-access", NULL, DOC},
> +        {"nfs.export-dir",                       "nfs/server",               
> "!nfs-export-dir", NULL, DOC}

Comment 9 Saurabh 2011-03-08 04:39:39 UTC
Gaurav,

  disabling the option is not working, 

Logs are here

gluster> volume info

Volume Name: dist1
Type: Distribute
Status: Started
Number of Bricks: 4
Transport-type: tcp
Bricks:
Brick1: 10.1.12.109:/mnt/dist1
Brick2: 10.1.12.110:/mnt/dist2
Brick3: 10.1.12.109:/mnt/add-dist1
Brick4: 10.1.12.110:/mnt/add-dist2
Options Reconfigured:
nfs.enable-ino32: enable

Volume Name: srj-dist
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.1.12.109:/mnt/srj-dist1
Brick2: 10.1.12.110:/mnt/srj-dist2
Options Reconfigured:
nfs.enable-ino32: enable
gluster> 
gluster> volume set dist1 nfs.enable-ino32 disable
operation failed
gluster> volume set dist1 nfs.enable-ino32 off
operation failed
gluster> volume set dist1 nfs.enable-ino32 0
operation failed
gluster> volume reset dis1
operation failed
gluster> volume reset dist1
operation failed
gluster>

Comment 10 Gaurav 2011-03-08 06:44:08 UTC
There seems to be some problem with glusterd, as no volume command was working except volume info. 
Things are fine after glusterd restart.
Saurabh you can file a seperate bug for it if you can reproduce it.

Comment 11 Saurabh 2011-03-08 08:42:11 UTC
Gaurav,

  I tried to provide a string value to the options that are looking for boolean values, and the string value gets set, here is the result,


gluster> volume set dist1 nfs.register-with-portmap something
Set volume successful
gluster> volume set dist1 nfs.dynamic-volumes something
Set volume successful
gluster> 
gluster> volume info 

Volume Name: srj-dist
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.1.12.109:/mnt/srj-dist1
Brick2: 10.1.12.110:/mnt/srj-dist2
Options Reconfigured:
nfs.register-with-portmap: something
nfs.dynamic-volumes: something
nfs.addr-namelookup: off
nfs.export-volumes: enable

Volume Name: dist1
Type: Distribute
Status: Started
Number of Bricks: 4
Transport-type: tcp
Bricks:
Brick1: 10.1.12.109:/mnt/dist1
Brick2: 10.1.12.110:/mnt/dist2
Brick3: 10.1.12.109:/mnt/add-dist1
Brick4: 10.1.12.110:/mnt/add-dist2
Options Reconfigured:
nfs.register-with-portmap: something
nfs.dynamic-volumes: something
nfs.addr-namelookup: off
nfs.export-volumes: enable
gluster> 


Hence I am marking this bug as re-opened, if you see that the values provided are fine then move the status accordingly

Comment 12 Gaurav 2011-03-08 09:40:06 UTC
Hi Saurabh,
Validation of newly added options will work only with BUG-2120 patch, so we need to wait for that patch.

Comment 13 Divya 2011-03-21 04:20:05 UTC
Added the following information "Bug 2064: Fixed the issue of NFS options being removed in /etc/glusterd/nfs/nfs-server.vol upon restarting glusterd." in Issues Resolved... section of 3.1.3 Release Notes.

Comment 14 Vijay Bellur 2011-03-23 08:55:32 UTC
PATCH: http://patches.gluster.com/patch/6561 in master (CLI : Validate options farmework.)

Comment 15 Saurabh 2011-04-15 05:02:41 UTC
verified,

by enabling some nfs option and restarted the /etc/init.d/glusterd, the nfs-server.vol was still displaying the option set earlier.