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 2016/04/06 11:42:44 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/branch-2.2 abefc68e5 -> 8b49b71d5
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/8b49b71d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b49b71d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b49b71d
Branch: refs/heads/branch-2.2
Commit: 8b49b71d5ef602e1252049fbc970958fbe05806e
Parents: abefc68
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Apr 6 12:42:23 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Apr 6 12:42:23 2016 +0300
----------------------------------------------------------------------
.../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/8b49b71d/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/8b49b71d/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 21f4a28..4347abb 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
@@ -210,6 +210,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/8b49b71d/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 6396c1e..66a7700 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
@@ -206,6 +206,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):
@@ -251,6 +255,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/8b49b71d/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 3f73a6c..57085e3 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
@@ -265,6 +265,7 @@
"dfs.namenode.handler.count": "100",
"dfs.namenode.checkpoint.dir": "/hadoop/hdfs/namesecondary,/hadoop/hdfs/namesecondary2",
"fs.permissions.umask-mode": "022",
+ "nfs.file.dump.dir": "/tmp/.hdfs-nfs",
"dfs.datanode.http.address": "0.0.0.0:50075",
"dfs.datanode.ipc.address": "0.0.0.0:8010",
"dfs.datanode.data.dir": "/hadoop/hdfs/data",
http://git-wip-us.apache.org/repos/asf/ambari/blob/8b49b71d/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 da2287f..503f7c8 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
@@ -297,6 +297,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",