ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-12633. Yarn SC won't pass with motd enabled (aonishuk)
Date Tue, 04 Aug 2015 16:06:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 f6154f83c -> 41aadeac4
  refs/heads/trunk 5da545625 -> de15d42f0


AMBARI-12633. Yarn SC won't pass with motd enabled (aonishuk)


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

Branch: refs/heads/trunk
Commit: de15d42f0adb0fb50f7f7fe8105046cde75420e5
Parents: 5da5456
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Aug 4 19:05:58 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Aug 4 19:05:58 2015 +0300

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/service_check.py           | 5 +++--
 .../test/python/stacks/2.0.6/YARN/test_yarn_service_check.py  | 7 +++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/de15d42f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
index 1d593ba..6aca8b2 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py
@@ -28,6 +28,7 @@ import subprocess
 from ambari_commons import os_utils
 from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyImpl
+from resource_management.libraries.functions.get_user_call_output import get_user_call_output
 
 CURL_CONNECTION_TIMEOUT = '5'
 
@@ -118,9 +119,9 @@ class ServiceCheckDefault(ServiceCheck):
 
       get_app_info_cmd = "curl --negotiate -u : -ksL --connect-timeout " + CURL_CONNECTION_TIMEOUT
+ " " + info_app_url
 
-      return_code, stdout = shell.checked_call(get_app_info_cmd,
-                                            path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+      return_code, stdout, _ = get_user_call_output(get_app_info_cmd,
                                             user=params.smokeuser,
+                                            path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
                                             )
 
       try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/de15d42f/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
index 65447c6..6279aab 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
@@ -24,6 +24,7 @@ from stacks.utils.RMFTestCase import *
 
 @patch("platform.linux_distribution", new = MagicMock(return_value="Linux"))
 @patch("sys.executable", new = '/usr/bin/python2.6')
+@patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new = MagicMock(return_value=(0, "{ \"app\": {\"state\": \"FINISHED\",\"finalStatus\": \"SUCCEEDED\"}}",'')))
 class TestServiceCheck(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "YARN/2.1.0.2.0/package"
   STACK_VERSION = "2.0.6"
@@ -41,8 +42,7 @@ class TestServiceCheck(RMFTestCase):
                           hdp_stack_version = self.STACK_VERSION,
                           target = RMFTestCase.TARGET_COMMON_SERVICES,
                           checked_call_mocks = [(0, "some test text, appTrackingUrl=http:"
-                                "//c6402.ambari.apache.org:8088/proxy/application_1429885383763_0001/,
some test text"),
-                                (0, "{ \"app\": {\"state\": \"FINISHED\",\"finalStatus\":
\"SUCCEEDED\"}}")]
+                                "//c6402.ambari.apache.org:8088/proxy/application_1429885383763_0001/,
some test text")]
     )
     self.assertNoMoreResources()
 
@@ -60,8 +60,7 @@ class TestServiceCheck(RMFTestCase):
                           hdp_stack_version = self.STACK_VERSION,
                           target = RMFTestCase.TARGET_COMMON_SERVICES,
                           checked_call_mocks = [(0, "some test text, appTrackingUrl=http:"
-                               "//c6402.ambari.apache.org:8088/proxy/application_1429885383763_0001/,
some test text"),
-                               (0, "{ \"app\": {\"state\": \"FINISHED\",\"finalStatus\":
\"SUCCEEDED\"}}")]
+                               "//c6402.ambari.apache.org:8088/proxy/application_1429885383763_0001/,
some test text")]
     )
 
     self.assertNoMoreResources()


Mime
View raw message