Return-Path: X-Original-To: apmail-ambari-issues-archive@minotaur.apache.org Delivered-To: apmail-ambari-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE53D18279 for ; Fri, 25 Mar 2016 11:54:25 +0000 (UTC) Received: (qmail 44935 invoked by uid 500); 25 Mar 2016 11:54:25 -0000 Delivered-To: apmail-ambari-issues-archive@ambari.apache.org Received: (qmail 44905 invoked by uid 500); 25 Mar 2016 11:54:25 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 44881 invoked by uid 99); 25 Mar 2016 11:54:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2016 11:54:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 972EF2C1F61 for ; Fri, 25 Mar 2016 11:54:25 +0000 (UTC) Date: Fri, 25 Mar 2016 11:54:25 +0000 (UTC) From: "Andrew Onischuk (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-14926) ambari cached hdfs.py conflicts with python hdfs lib resulting into monitoring errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-14926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Onischuk updated AMBARI-14926: ------------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) Committed to trunk and branch-2.2 > ambari cached hdfs.py conflicts with python hdfs lib resulting into monitoring errors > ------------------------------------------------------------------------------------- > > Key: AMBARI-14926 > URL: https://issues.apache.org/jira/browse/AMBARI-14926 > Project: Ambari > Issue Type: Bug > Components: ambari-agent > Affects Versions: 2.2.0 > Environment: Linux CentOS 7 x86_64 > Reporter: matteo brancaleoni > Assignee: Andrew Onischuk > Attachments: AMBARI-14926.patch > > > On systems with datanode and journal node monitored by ambari-agent, > if in the standard python path the hdfs lib is installed ( https://pypi.python.org/pypi/hdfs/ ) it makes datanode + journalnode monitoring fail: > * datanodes are seen up in global live datanodes > * but the service is down into the host service list (restart will work, but are marked as stopped) > looking into the logs I get: > DEBUG 2016-02-04 16:54:49,160 PythonReflectiveExecutor.py:47 - Running command reflectively ['/usr/bin/python2', > u'/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py', > 'SECURITY_STATUS', > -- > '/var/lib/ambari-agent/tmp'] > DEBUG 2016-02-04 16:54:49,170 PythonReflectiveExecutor.py:61 - Reflective command failed with exception: > Traceback (most recent call last): > File "/usr/lib/python2.6/site-packages/ambari_agent/PythonReflectiveExecutor.py", line 55, in run_file > imp.load_source('__main__', script) > File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py", line 30, in > from utils import service > File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py", line 37, in > from zkfc_slave import ZkfcSlave > File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py", line 21, in > from hdfs import hdfs > ImportError: cannot import name hdfs > I think that ambari is including its cache files after the python path, so if an hdfs module is present into python path makes the scripts goes crazy. > (basically using the system hdfs py module and not his own) > maybe cache files path must be included before the python path or imported with local imports? -- This message was sent by Atlassian JIRA (v6.3.4#6332)