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 2017/02/20 12:46:32 UTC

[1/2] ambari git commit: AMBARI-20081. Install actions fail when switching from root to non-root. (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 361f225d8 -> b7f3713a2
  refs/heads/trunk 2744ae82a -> 709bf6ef3


AMBARI-20081. Install actions fail when switching from root to non-root. (aonishuk)


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

Branch: refs/heads/trunk
Commit: 709bf6ef3261e609bec1161d02ae6787911e2919
Parents: 2744ae8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Feb 20 14:45:43 2017 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Feb 20 14:45:43 2017 +0200

----------------------------------------------------------------------
 .../HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py  | 4 ++++
 .../test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/709bf6ef/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
index f97789b..4d0de7f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
@@ -198,6 +198,10 @@ def setup_java():
          not_if = format("test -f {jdk_curl_target}")
     )
 
+    File(jdk_curl_target,
+         mode = 0755,
+    )
+
     tmp_java_dir = tempfile.mkdtemp(prefix="jdk_tmp_", dir=params.tmp_dir)
 
     try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/709bf6ef/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
index 3b614d9..75c6543 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
@@ -193,6 +193,9 @@ class TestHookBeforeInstall(RMFTestCase):
                               content = DownloadSource('http://c6401.ambari.apache.org:8080/resources//jdk-7u67-linux-x64.tar.gz'),
                               not_if = 'test -f /tmp/jdk-7u67-linux-x64.tar.gz',
                               )
+    self.assertResourceCalled('File', '/tmp/jdk-7u67-linux-x64.tar.gz',
+                              mode = 0755,
+                              )
     self.assertResourceCalled('Directory', '/usr/jdk64',)
     self.assertResourceCalled('Execute', ('chmod', 'a+x', u'/usr/jdk64'),
                               sudo = True


[2/2] ambari git commit: AMBARI-20081. Install actions fail when switching from root to non-root. (aonishuk)

Posted by ao...@apache.org.
AMBARI-20081. Install actions fail when switching from root to non-root. (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: b7f3713a21a8cf17e323f68e4d23590ed507084f
Parents: 361f225
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Feb 20 14:45:45 2017 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Feb 20 14:45:45 2017 +0200

----------------------------------------------------------------------
 .../HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py  | 4 ++++
 .../test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f3713a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
index f97789b..4d0de7f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
@@ -198,6 +198,10 @@ def setup_java():
          not_if = format("test -f {jdk_curl_target}")
     )
 
+    File(jdk_curl_target,
+         mode = 0755,
+    )
+
     tmp_java_dir = tempfile.mkdtemp(prefix="jdk_tmp_", dir=params.tmp_dir)
 
     try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f3713a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
index 3b614d9..75c6543 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
@@ -193,6 +193,9 @@ class TestHookBeforeInstall(RMFTestCase):
                               content = DownloadSource('http://c6401.ambari.apache.org:8080/resources//jdk-7u67-linux-x64.tar.gz'),
                               not_if = 'test -f /tmp/jdk-7u67-linux-x64.tar.gz',
                               )
+    self.assertResourceCalled('File', '/tmp/jdk-7u67-linux-x64.tar.gz',
+                              mode = 0755,
+                              )
     self.assertResourceCalled('Directory', '/usr/jdk64',)
     self.assertResourceCalled('Execute', ('chmod', 'a+x', u'/usr/jdk64'),
                               sudo = True