Reply
Deb
New Contributor
Posts: 2
Registered: ‎05-15-2014

NFS Gateway is not automatically refreshing the Unix Name and Unix Group

Steps completed:

  1. Start the NFS Server
  2. Create Unix Account say bug user in LDAP or the node where NFS is running

[root@hadoop-vm hadoop-hdfs]# date

Thu May 15 14:40:54 EDT 2014

[root@hadoop-vm hadoop-hdfs]# id hadoopuser

uid=1800(hadoopuser) gid=1800(hadoopuser) groups=1800(hadoopuser)

 

  1. Create HDFS Directory and assign the ownership to the User account which was just created

 

[root@hadoop-vm hadoop-hdfs]# sudo -u hdfs hadoop fs -mkdir /testdir

[root@hadoop-vm hadoop-hdfs]# sudo -u hdfs hadoop fs -chown hadoopuser:hadoopuser /testdir

[root@hadoop-vm hadoop-hdfs]# sudo -u hdfs hadoop fs -chmod 700 /testdir

[root@hadoop-vm hadoop-hdfs]# sudo -u hdfs hadoop fs -ls /.

Found 1 items

drwx------   - hadoopuser hadoopuser          0 2014-05-15 14:42 /testdir

 

  1. Go to the client machine which already has HDFS mounted. 

 

[hadoopuser@hadoopclient ~]$ id hadoopuser

uid=1800(hadoopuser) gid=1800(hadoopuser) groups=1800(hadoopuser)

[hadoopuser@hadoopclient ~]$ cd /hdfsmount

[hadoopuser@hadoopclient hdfsmount]$ ls -ltra

total 5

dr-xr-xr-x. 26 root       root       4096 May 13 18:04 ..

drwx------.  2 3008912752 3008912752   64 May 15 14:42 testdir

drwxr-xr-x.  3        497 2584148964   96 May 15 14:42 .

[hadoopuser@hadoopclient hdfsmount]$ cd testdir

-bash: cd: testdir: Permission denied

 

 

Observations:

On the node where Gateway is running, the Gateway code pulls the Unix name and Unix ID in a map after executing the command listed below. This map is automatically supposed to be refreshed but its not happening.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.hadoop/hadoop-nfs/2.1.0-beta/org/apache/h...

 

static final String LINUX_GET_ALL_USERS_CMD = "getent passwd | cut -d: -f1,3";

static final String LINUX_GET_ALL_GROUPS_CMD = "getent group | cut -d: -f1,3”;

 

 

I did not bounce the gateway.  To confirm its a bug I recreated this bug in a different machine where  I Installed CDH5. I was able to recreate the  same issue in our Hadoop environment provided by you and in our development environment I had created the Unix Account with same UID in Name Node and Gateway as well.

 

Is there a fix for this? 

 

Deb
New Contributor
Posts: 2
Registered: ‎05-15-2014

Re: NFS Gateway is not automatically refreshing the Unix Name and Unix Group

This is the Apache JIRA to track the fix. Thanks!

 https://issues.apache.org/jira/browse/HADOOP-10612

 

Announcements