Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 231A1200CAD for ; Mon, 5 Jun 2017 22:00:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 221CE160BE7; Mon, 5 Jun 2017 20:00:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 60A38160BE8 for ; Mon, 5 Jun 2017 22:00:41 +0200 (CEST) Received: (qmail 62478 invoked by uid 500); 5 Jun 2017 20:00:40 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 62349 invoked by uid 99); 5 Jun 2017 20:00:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2017 20:00:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5649FE04F2; Mon, 5 Jun 2017 20:00:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jonathanhurley@apache.org To: commits@ambari.apache.org Date: Mon, 05 Jun 2017 20:00:49 -0000 Message-Id: In-Reply-To: <1c08d7554ef04713ae5ecf9b373a5171@git.apache.org> References: <1c08d7554ef04713ae5ecf9b373a5171@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/17] ambari git commit: AMBARI-21176. Oozie server start failed during cluster deploy with "NameError: global name "out" is not defined".(vbrodetskyi) archived-at: Mon, 05 Jun 2017 20:00:42 -0000 AMBARI-21176. Oozie server start failed during cluster deploy with "NameError: global name "out" is not defined".(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9acb7a64 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9acb7a64 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9acb7a64 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 9acb7a64444d5cc1e0ebc648f0e6413f6f949ac1 Parents: 201c6d0 Author: Vitaly Brodetskyi Authored: Fri Jun 2 22:01:12 2017 +0300 Committer: Vitaly Brodetskyi Committed: Fri Jun 2 22:03:22 2017 +0300 ---------------------------------------------------------------------- .../OOZIE/4.0.0.2.0/package/scripts/oozie.py | 9 ++------- .../OOZIE/4.2.0.3.0/package/scripts/oozie.py | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9acb7a64/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index def0545..d916d3b 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -38,7 +38,7 @@ from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.libraries.script.script import Script from resource_management.libraries.functions.security_commons import update_credential_provider_path from resource_management.core.resources.packaging import Package -from resource_management.core.shell import as_user, as_sudo, call +from resource_management.core.shell import as_user, as_sudo, call, checked_call from resource_management.core.exceptions import Fail from resource_management.libraries.functions.setup_atlas_hook import has_atlas_in_cluster, setup_atlas_hook @@ -409,12 +409,7 @@ def copy_atlas_hive_hook_to_dfs_share_lib(upgrade_type=None, upgrade_direction=N # This can return over 100 files, so take the first 5 lines after "Available ShareLib" # Use -oozie http(s):localhost:{oozie_server_admin_port}/oozie as oozie-env does not export OOZIE_URL command = format(r'source {conf_dir}/oozie-env.sh ; oozie admin -oozie {oozie_base_url} -shareliblist hive | grep "\[Available ShareLib\]" -A 5') - Execute(command, - user=params.oozie_user, - tries=10, - try_sleep=5, - logoutput=True, - ) + code, out = checked_call(command, user=params.oozie_user, tries=10, try_sleep=5, logoutput=True) hive_sharelib_dir = __parse_sharelib_from_output(out) http://git-wip-us.apache.org/repos/asf/ambari/blob/9acb7a64/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py index def0545..d916d3b 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py @@ -38,7 +38,7 @@ from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.libraries.script.script import Script from resource_management.libraries.functions.security_commons import update_credential_provider_path from resource_management.core.resources.packaging import Package -from resource_management.core.shell import as_user, as_sudo, call +from resource_management.core.shell import as_user, as_sudo, call, checked_call from resource_management.core.exceptions import Fail from resource_management.libraries.functions.setup_atlas_hook import has_atlas_in_cluster, setup_atlas_hook @@ -409,12 +409,7 @@ def copy_atlas_hive_hook_to_dfs_share_lib(upgrade_type=None, upgrade_direction=N # This can return over 100 files, so take the first 5 lines after "Available ShareLib" # Use -oozie http(s):localhost:{oozie_server_admin_port}/oozie as oozie-env does not export OOZIE_URL command = format(r'source {conf_dir}/oozie-env.sh ; oozie admin -oozie {oozie_base_url} -shareliblist hive | grep "\[Available ShareLib\]" -A 5') - Execute(command, - user=params.oozie_user, - tries=10, - try_sleep=5, - logoutput=True, - ) + code, out = checked_call(command, user=params.oozie_user, tries=10, try_sleep=5, logoutput=True) hive_sharelib_dir = __parse_sharelib_from_output(out)