ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-13309. After hdp-select failure Ambari won't retry resulting in components failures with strange output (aonishuk)
Date Mon, 05 Oct 2015 11:30:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a845a44a2 -> cad57c562


AMBARI-13309. After hdp-select failure Ambari won't retry resulting in components failures
with strange output (aonishuk)


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

Branch: refs/heads/trunk
Commit: cad57c562692ac7bc8c61a3d4504a8c12fdae2f0
Parents: a845a44
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Oct 5 14:30:43 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Oct 5 14:30:43 2015 +0300

----------------------------------------------------------------------
 .../scripts/shared_initialization.py            |  4 ++--
 .../hooks/after-INSTALL/test_after_install.py   | 20 ++++++++------------
 2 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cad57c56/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
index d3b1448..e81f252 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -36,8 +36,8 @@ def setup_hdp_install_directory():
   SELECT_ALL_PERFORMED_MARKER = "/var/lib/ambari-agent/data/hdp-select-set-all.performed"
   import params
   if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2')
>= 0:
-    Execute(as_sudo(['touch', SELECT_ALL_PERFORMED_MARKER]) + ' ; ' +
-                   format('{sudo} /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^{stack_version_unformatted} | tail -1`'),
+    Execute(format('{sudo} /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^{stack_version_unformatted} | tail -1`') + ' && ' +
+            as_sudo(['touch', SELECT_ALL_PERFORMED_MARKER]),
             only_if=format('ls -d /usr/hdp/{stack_version_unformatted}*'),   # If any HDP
version is installed
             not_if=format("test -f {SELECT_ALL_PERFORMED_MARKER}")           # Do that only
once (otherwise we break rolling upgrade logic)
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/cad57c56/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
b/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
index 5d5926b..de3d7ce 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
@@ -69,12 +69,10 @@ class TestHookAfterInstall(RMFTestCase):
                        config_dict = json_content)
 
 
-    self.assertResourceCalled("Execute",
-      "ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E touch /var/lib/ambari-agent/data/hdp-select-set-all.performed
; " \
-      "ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^2.3 | tail -1`",
-      only_if = "ls -d /usr/hdp/2.3*",
-      not_if = "test -f /var/lib/ambari-agent/data/hdp-select-set-all.performed")
-
+    self.assertResourceCalled('Execute', 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap
/usr/bin/hdp-select versions | grep ^2.3 | tail -1` && ambari-sudo.sh [RMF_ENV_PLACEHOLDER]
-H -E touch /var/lib/ambari-agent/data/hdp-select-set-all.performed',
+        not_if = 'test -f /var/lib/ambari-agent/data/hdp-select-set-all.performed',
+        only_if = 'ls -d /usr/hdp/2.3*',
+    )
 
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
@@ -310,12 +308,10 @@ class TestHookAfterInstall(RMFTestCase):
                        config_dict = json_content)
 
 
-    self.assertResourceCalled("Execute",
-      "ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E touch /var/lib/ambari-agent/data/hdp-select-set-all.performed
; " \
-      "ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^2.3 | tail -1`",
-      only_if = "ls -d /usr/hdp/2.3*",
-      not_if = "test -f /var/lib/ambari-agent/data/hdp-select-set-all.performed")
-
+    self.assertResourceCalled('Execute', 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap
/usr/bin/hdp-select versions | grep ^2.3 | tail -1` && ambari-sudo.sh [RMF_ENV_PLACEHOLDER]
-H -E touch /var/lib/ambari-agent/data/hdp-select-set-all.performed',
+        not_if = 'test -f /var/lib/ambari-agent/data/hdp-select-set-all.performed',
+        only_if = 'ls -d /usr/hdp/2.3*',
+    )
 
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',


Mime
View raw message