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/09 14:10:21 UTC
[1/2] ambari git commit: AMBARI-14289. Rebalance HDFS fails with
Operation not permitted error on an HA cluster (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 d2501c8a1 -> 0a213f70f
refs/heads/trunk 1e6d80f3c -> b5b876826
AMBARI-14289. Rebalance HDFS fails with Operation not permitted error on an HA cluster (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5b87682
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5b87682
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5b87682
Branch: refs/heads/trunk
Commit: b5b87682646e55ec102ffcf978814ff27d0a60d4
Parents: 1e6d80f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Dec 9 15:10:10 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Dec 9 15:10:10 2015 +0200
----------------------------------------------------------------------
.../HDFS/2.1.0.2.0/package/scripts/namenode.py | 8 +++++---
.../src/test/python/stacks/2.0.6/HDFS/test_namenode.py | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b5b87682/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index 3e43e96..598d9ce 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -26,7 +26,7 @@ from datetime import datetime
import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
from resource_management import Script
-from resource_management.core.resources.system import Execute
+from resource_management.core.resources.system import Execute, File
from resource_management.core import shell
from resource_management.libraries.functions import conf_select
from resource_management.libraries.functions import hdp_select
@@ -369,9 +369,11 @@ class NameNodeDefault(NameNode):
logoutput = False,
)
- if params.security_enabled and os.path.exists(ccache_file_path):
+ if params.security_enabled:
# Delete the kerberos credentials cache (ccache) file
- os.remove(ccache_file_path)
+ File(ccache_file_path,
+ action = "delete",
+ )
@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
class NameNodeWindows(NameNode):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b5b87682/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index 17c574b..0c2f046 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -1231,6 +1231,9 @@ class TestNamenode(RMFTestCase):
logoutput = False,
on_new_line = FunctionMock('handle_new_line'),
)
+ self.assertResourceCalled('File', ccache_path,
+ action = ['delete'],
+ )
self.assertNoMoreResources()
@patch("os.path.isfile")
[2/2] ambari git commit: AMBARI-14289. Rebalance HDFS fails with
Operation not permitted error on an HA cluster (aonishuk)
Posted by ao...@apache.org.
AMBARI-14289. Rebalance HDFS fails with Operation not permitted error on an HA cluster (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a213f70
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a213f70
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a213f70
Branch: refs/heads/branch-2.2
Commit: 0a213f70fc905687f98da236f8a9dde62793e646
Parents: d2501c8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Dec 9 15:10:12 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Dec 9 15:10:12 2015 +0200
----------------------------------------------------------------------
.../HDFS/2.1.0.2.0/package/scripts/namenode.py | 8 +++++---
.../src/test/python/stacks/2.0.6/HDFS/test_namenode.py | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0a213f70/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index 8684a96..13d1912 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -26,7 +26,7 @@ from datetime import datetime
import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
from resource_management import Script
-from resource_management.core.resources.system import Execute
+from resource_management.core.resources.system import Execute, File
from resource_management.core import shell
from resource_management.libraries.functions import conf_select
from resource_management.libraries.functions import hdp_select
@@ -369,9 +369,11 @@ class NameNodeDefault(NameNode):
logoutput = False,
)
- if params.security_enabled and os.path.exists(ccache_file_path):
+ if params.security_enabled:
# Delete the kerberos credentials cache (ccache) file
- os.remove(ccache_file_path)
+ File(ccache_file_path,
+ action = "delete",
+ )
@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
class NameNodeWindows(NameNode):
http://git-wip-us.apache.org/repos/asf/ambari/blob/0a213f70/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index 47e35de..e463972 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -1204,6 +1204,9 @@ class TestNamenode(RMFTestCase):
logoutput = False,
on_new_line = FunctionMock('handle_new_line'),
)
+ self.assertResourceCalled('File', ccache_path,
+ action = ['delete'],
+ )
self.assertNoMoreResources()
@patch("os.path.isfile")