Bug 765144 (GLUSTER-3412)

Summary: Is no longer possible to disable 'nfs.addr-namelookup' in GlusterFS 3.2.2
Product: [Community] GlusterFS Reporter: Jeff Byers <jbyers>
Component: nfsAssignee: Krishna Srinivas <krishna>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.2CC: gluster-bugs, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: nfs
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Byers 2011-08-14 17:31:37 UTC
Is no longer possible to disable 'nfs.addr-namelookup' in
GlusterFS 3.2.2

If you don't wish do, or cannot use DNS name resolution with
GlusterFS for NFS volumes, the volume's 'nfs.addr-
namelookup' option needs to be changed from the default of
'on', to 'off'. This worked OK in GlusterFS 3.2.1, but it no
longer works in 3.2.2.

The problem looks to be a side effect of this fix, which if
backed out, allows namelookup to be disabled:

    commit 1fc2a841ae90b0f29bf8aa39351bd92879ec1f44
    Author: Junaid <junaid>
    Date:   Mon Jun 13 00:51:10 2011 +0000

        mgmt/glusterd: Set the generic options in the graph
        before merging it with the parent graph while
        building nfs-server volfile.

        BUG: 3003 (Modification of one of the options of
        volume is reflected in all the volumes in the nfs-
        server-volfile)

        URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3003

Although the 'gluster volume info' shows the 'namelookup'
option set to "off", the corresponding setting 'rpc-auth.addr.namelookup'
does not appear in the 'nfs.log' in 3.2.2 like it did in 3.2.1.

I have not tried any other volume options to see if any
others are similarly impacted.

Details below:

[root@SC-10-10-200-169 log]# cat /etc/resolv.conf

[root@SC-10-10-200-169 log]# nslookup 10.10.200.169
;; connection timed out; no servers could be reached

# gluster volume info

Volume Name: nas-volume-0001
Type: Distribute
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 192.168.5.169:/exports/nas-segment-0001
Options Reconfigured:
nfs.addr-namelookup: off

# mount -v 10.10.200.169:/nas-volume-0001 /mnt/blah
mount: trying 10.10.200.169 prog 100003 vers 3 prot tcp port 38467
mount: trying 10.10.200.169 prog 100005 vers 3 prot tcp port 38465
mount: 10.10.200.169:/nas-volume-0001 failed, reason given by server: Permission denied

nfs.log:

[2011-08-14 09:36:51.735399] I [nfs.c:675:init] 0-nfs: NFS service started
[2011-08-14 09:36:51.735543] W [write-behind.c:3029:init] 0-nas-volume-0001-write-behind: disabling write-behind for first 0 bytes
[2011-08-14 09:36:51.739050] I [client.c:1935:notify] 0-nas-volume-0001-client-0: parent translators are ready, attempting connect on transport
Given volfile:
+------------------------------------------------------------------------------+
  1: volume nas-volume-0001-client-0
  2:     type protocol/client
  3:     option remote-host 192.168.5.169
  4:     option remote-subvolume /exports/nas-segment-0001
  5:     option transport-type tcp
  6: end-volume
  7:
  8: volume nas-volume-0001-write-behind
  9:     type performance/write-behind
 10:     subvolumes nas-volume-0001-client-0
 11: end-volume
 12:
 13: volume nas-volume-0001-read-ahead
 14:     type performance/read-ahead
 15:     subvolumes nas-volume-0001-write-behind
 16: end-volume
 17:
 18: volume nas-volume-0001-io-cache
 19:     type performance/io-cache
 20:     subvolumes nas-volume-0001-read-ahead
 21: end-volume
 22:
 23: volume nas-volume-0001-quick-read
 24:     type performance/quick-read
 25:     subvolumes nas-volume-0001-io-cache
 26: end-volume
 27:
 28: volume nas-volume-0001
 29:     type debug/io-stats
 30:     option latency-measurement off
 31:     option count-fop-hits off
 32:     subvolumes nas-volume-0001-quick-read
 33: end-volume
 34:
 35: volume nfs-server
 36:     type nfs/server
 37:     option nfs.dynamic-volumes on
 38:     option rpc-auth.addr.nas-volume-0001.allow *
 39:     option nfs3.nas-volume-0001.volume-id 69e19eca-96cd-4688-9c83-28b6ecb7c05f
 40:     subvolumes nas-volume-0001
 41: end-volume

+------------------------------------------------------------------------------+
[2011-08-14 09:36:51.742173] I [rpc-clnt.c:1531:rpc_clnt_reconfig] 0-nas-volume-0001-client-0: changing port to 24013 (from 0)
[2011-08-14 09:36:54.747974] I [client-handshake.c:1082:select_server_supported_programs] 0-nas-volume-0001-client-0: Using Program GlusterFS-3.1.0, Num (1298437), Version (310)
[2011-08-14 09:36:54.750121] I [client-handshake.c:913:client_setvolume_cbk] 0-nas-volume-0001-client-0: Connected to 192.168.5.169:24013, attached to remote volume '/exports/nas-segment-0001'.
[2011-08-14 09:37:31.609187] E [rpcsvc.c:500:nfs_rpcsvc_conn_peer_check_name] 0-nfsrpc: Failed to get remote addr: Temporary failure in name resolution
[2011-08-14 09:37:31.609274] E [rpcsvc.c:500:nfs_rpcsvc_conn_peer_check_name] 0-nfsrpc: Failed to get remote addr: Temporary failure in name resolution

GlusterFS 3.2.1 nfs.log:

 69: volume nfs-server
 70:     type nfs/server
 71:     option nfs.dynamic-volumes on
 72:     option rpc-auth.addr.nas-volume-0001.allow *
 73:     option nfs3.nas-volume-0001.volume-id 23d1966c-2583-41b1-9976-8ffb20d9507a
 74:     option rpc-auth.addr.namelookup off

Comment 1 Vijay Bellur 2011-09-08 03:56:25 UTC
Need to validate and resolve.

Comment 2 Krishna Srinivas 2011-09-13 07:53:25 UTC
(In reply to comment #1)
> Need to validate and resolve.

The bug is present in 3.2.2 and not present in 3.2.3. Closing the bug.