ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-10841. If /selinux/enforce file exists with value 0 cluster deployment fails.(vbrodetskyi)
Date Thu, 30 Apr 2015 08:06:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5be634f02 -> a73782d52


AMBARI-10841. If /selinux/enforce file exists with value 0 cluster deployment fails.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: a73782d52ece502beb05494b17eac7002903dd19
Parents: 5be634f
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Sun Apr 26 20:49:57 2015 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Sun Apr 26 20:49:57 2015 +0300

----------------------------------------------------------------------
 .../HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py | 1 +
 .../python/stacks/2.0.6/hooks/before-START/test_before_start.py   | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a73782d5/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index e371b00..70bd011 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -29,6 +29,7 @@ def setup_hadoop():
 
   Execute(("setenforce","0"),
           only_if="test -f /selinux/enforce",
+          not_if="(! which getenforce ) || (which getenforce && getenforce | grep
-q Disabled)",
           sudo=True,
   )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a73782d5/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
index bc5f551..2a810a0 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
@@ -34,6 +34,7 @@ class TestHookBeforeStart(RMFTestCase):
     )
     self.assertResourceCalled('Execute', ('setenforce', '0'),
                               only_if = 'test -f /selinux/enforce',
+                              not_if = "(! which getenforce ) || (which getenforce &&
getenforce | grep -q Disabled)",
                               sudo=True,
                               )
     self.assertResourceCalled('Directory', '/var/log/hadoop',
@@ -104,6 +105,7 @@ class TestHookBeforeStart(RMFTestCase):
     )
     self.assertResourceCalled('Execute', ('setenforce', '0'),
                               only_if = 'test -f /selinux/enforce',
+                              not_if = "(! which getenforce ) || (which getenforce &&
getenforce | grep -q Disabled)",
                               sudo=True,
                               )
     self.assertResourceCalled('Directory', '/var/log/hadoop',
@@ -170,6 +172,7 @@ class TestHookBeforeStart(RMFTestCase):
     )
     self.assertResourceCalled('Execute', ('setenforce', '0'),
                               only_if = 'test -f /selinux/enforce',
+                              not_if = "(! which getenforce ) || (which getenforce &&
getenforce | grep -q Disabled)",
                               sudo=True,
                               )
     self.assertResourceCalled('Directory', '/usr/lib/hadoop/lib/native/Linux-i386-32',


Mime
View raw message