You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/12/25 15:03:15 UTC

ambari git commit: AMBARI-14497. NFS Gateway fails to start with /tmp/.hdfs-nfs warning in logs (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 9df5e635a -> bc841dce6


AMBARI-14497. NFS Gateway fails to start with /tmp/.hdfs-nfs warning in logs (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc841dce
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc841dce
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc841dce

Branch: refs/heads/trunk
Commit: bc841dce6305fd3b4a018c79dfbf258cd9910a12
Parents: 9df5e63
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Dec 25 16:03:12 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Dec 25 16:03:12 2015 +0200

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py        | 5 ++++-
 .../HDFS/2.1.0.2.0/package/scripts/params_linux.py           | 1 +
 .../src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py     | 8 ++++++++
 .../src/test/python/stacks/2.0.6/configs/default.json        | 1 +
 .../src/test/python/stacks/2.0.6/configs/secured.json        | 1 +
 5 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc841dce/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py
index d874b2e..672312a 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_nfsgateway.py
@@ -61,7 +61,10 @@ def nfsgateway(action=None, format=False):
     prepare_rpcbind()
 
   if action == "configure":
-    return
+    Directory(params.nfs_file_dump_dir,
+              owner = params.hdfs_user,
+              group = params.user_group,
+    )
   elif action == "start" or action == "stop":
     service(
       action=action,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc841dce/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 0dc1758..c923e23 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -201,6 +201,7 @@ proxyuser_group =  config['configurations']['hadoop-env']['proxyuser_group']
 #hadoop params
 hdfs_log_dir_prefix = config['configurations']['hadoop-env']['hdfs_log_dir_prefix']
 hadoop_root_logger = config['configurations']['hadoop-env']['hadoop_root_logger']
+nfs_file_dump_dir = config['configurations']['hdfs-site']['nfs.file.dump.dir']
 
 dfs_domain_socket_path = config['configurations']['hdfs-site']['dfs.domain.socket.path']
 dfs_domain_socket_dir = os.path.dirname(dfs_domain_socket_path)

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc841dce/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py
index 9f36bdd..36b67f0 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py
@@ -209,6 +209,10 @@ class TestNFSGateway(RMFTestCase):
                               content = Template('slaves.j2'),
                               owner = 'hdfs',
                               )
+    self.assertResourceCalled('Directory', '/tmp/.hdfs-nfs',
+        owner = 'hdfs',
+        group = 'hadoop',
+    )
 
 
   def assert_configure_secured(self):
@@ -254,6 +258,10 @@ class TestNFSGateway(RMFTestCase):
                               content = Template('slaves.j2'),
                               owner = 'root',
                               )
+    self.assertResourceCalled('Directory', '/tmp/.hdfs-nfs',
+        owner = 'hdfs',
+        group = 'hadoop',
+    )
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc841dce/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index bc40657..814dfce 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -242,6 +242,7 @@
             "dfs.namenode.avoid.write.stale.datanode": "true", 
             "dfs.block.access.token.enable": "true", 
             "dfs.support.append": "true", 
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
             "dfs.datanode.address": "0.0.0.0:${ambari.dfs.datanode.port}", 
             "dfs.cluster.administrators": "test_user1,test_user2 hdfs,test_group",
             "dfs.replication": "3", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc841dce/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index 9533473..d673973 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -294,6 +294,7 @@
             "dfs.client.read.shortcircuit": "true", 
             "dfs.journalnode.keytab.file": "/etc/security/keytabs/jn.service.keytab", 
             "dfs.datanode.http.address": "0.0.0.0:1022",
+            "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
             "dfs.datanode.du.reserved": "1073741824", 
             "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
             "dfs.secondary.namenode.keytab.file": "/etc/security/keytabs/nn.service.keytab",