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/08/04 18:06:05 UTC
[2/2] ambari git commit: AMBARI-12633. Yarn SC won't pass with motd
enabled (aonishuk)
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/41aadeac
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/41aadeac
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/41aadeac
Branch: refs/heads/branch-2.1
Commit: 41aadeac48e945e07ce709d9e2b9315bfa56d520
Parents: f6154f8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Aug 4 19:06:00 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Aug 4 19:06:00 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/41aadeac/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/41aadeac/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()