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/11 15:18:09 UTC

[1/2] ambari git commit: AMBARI-14342. Error during Node Manager start after enabling security post Express Upgrade from 2.1 to 2.3.4 (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 45dd43758 -> 3842f9e2a
  refs/heads/trunk 310c31535 -> c5065addc


AMBARI-14342. Error during Node Manager start after enabling security post Express Upgrade from 2.1 to 2.3.4 (aonishuk)


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

Branch: refs/heads/trunk
Commit: c5065addc9f51da9bfaa26093ad10754a49345d6
Parents: 310c315
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Dec 11 16:17:57 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Dec 11 16:17:57 2015 +0200

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py                | 3 ++-
 .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py        | 1 +
 .../src/test/python/stacks/2.0.6/YARN/test_nodemanager.py         | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c5065add/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index cb8f77b..f4efa9d 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -124,7 +124,8 @@ hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
 smokeuser = config['configurations']['cluster-env']['smokeuser']
 smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
 security_enabled = config['configurations']['cluster-env']['security_enabled']
-nm_security_marker = '/var/lib/hadoop-yarn/nm_security_enabled'
+nm_security_marker_dir = "/var/lib/hadoop-yarn"
+nm_security_marker = format('{nm_security_marker_dir}/nm_security_enabled')
 current_nm_security_state = os.path.isfile(nm_security_marker)
 toggle_nm_security = (current_nm_security_state and not security_enabled) or (not current_nm_security_state and security_enabled)
 smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']

http://git-wip-us.apache.org/repos/asf/ambari/blob/c5065add/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index da8cbf3..05e19cf 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -124,6 +124,7 @@ def yarn(name = None):
 
       # Setting NM marker file
       if params.security_enabled:
+        Directory(params.nm_security_marker_dir)
         File(params.nm_security_marker,
              content="Marker file to track first start after enabling/disabling security. "
                      "During first start yarn local, log dirs are removed and recreated"

http://git-wip-us.apache.org/repos/asf/ambari/blob/c5065add/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
index 7382f15..201443a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
@@ -336,6 +336,7 @@ class TestNodeManager(RMFTestCase):
     self.assertResourceCalled('Directory', '/hadoop/yarn/log',
                               action = ['delete']
     )
+    self.assertResourceCalled('Directory', '/var/lib/hadoop-yarn',)
     self.assertResourceCalled('File', '/var/lib/hadoop-yarn/nm_security_enabled',
                               content= 'Marker file to track first start after enabling/disabling security. During first start yarn local, log dirs are removed and recreated'
     )


[2/2] ambari git commit: AMBARI-14342. Error during Node Manager start after enabling security post Express Upgrade from 2.1 to 2.3.4 (aonishuk)

Posted by ao...@apache.org.
AMBARI-14342. Error during Node Manager start after enabling security post Express Upgrade from 2.1 to 2.3.4 (aonishuk)


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

Branch: refs/heads/branch-2.2
Commit: 3842f9e2a508c12900aca187a0c5596728b44daf
Parents: 45dd437
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Dec 11 16:18:00 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Dec 11 16:18:00 2015 +0200

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py                | 3 ++-
 .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py        | 1 +
 .../src/test/python/stacks/2.0.6/YARN/test_nodemanager.py         | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3842f9e2/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index beadedd..15ad4b4 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -125,7 +125,8 @@ hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
 smokeuser = config['configurations']['cluster-env']['smokeuser']
 smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
 security_enabled = config['configurations']['cluster-env']['security_enabled']
-nm_security_marker = '/var/lib/hadoop-yarn/nm_security_enabled'
+nm_security_marker_dir = "/var/lib/hadoop-yarn"
+nm_security_marker = format('{nm_security_marker_dir}/nm_security_enabled')
 current_nm_security_state = os.path.isfile(nm_security_marker)
 toggle_nm_security = (current_nm_security_state and not security_enabled) or (not current_nm_security_state and security_enabled)
 smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']

http://git-wip-us.apache.org/repos/asf/ambari/blob/3842f9e2/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index d596f2b..8f5ba2b 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -124,6 +124,7 @@ def yarn(name = None):
 
       # Setting NM marker file
       if params.security_enabled:
+        Directory(params.nm_security_marker_dir)
         File(params.nm_security_marker,
              content="Marker file to track first start after enabling/disabling security. "
                      "During first start yarn local, log dirs are removed and recreated"

http://git-wip-us.apache.org/repos/asf/ambari/blob/3842f9e2/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
index e25f460..19c77f2 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
@@ -336,6 +336,7 @@ class TestNodeManager(RMFTestCase):
     self.assertResourceCalled('Directory', '/hadoop/yarn/log',
                               action = ['delete']
     )
+    self.assertResourceCalled('Directory', '/var/lib/hadoop-yarn',)
     self.assertResourceCalled('File', '/var/lib/hadoop-yarn/nm_security_enabled',
                               content= 'Marker file to track first start after enabling/disabling security. During first start yarn local, log dirs are removed and recreated'
     )