Return-Path: X-Original-To: apmail-ambari-user-archive@www.apache.org Delivered-To: apmail-ambari-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56AAC175EB for ; Wed, 8 Apr 2015 19:01:24 +0000 (UTC) Received: (qmail 76565 invoked by uid 500); 8 Apr 2015 19:01:24 -0000 Delivered-To: apmail-ambari-user-archive@ambari.apache.org Received: (qmail 76537 invoked by uid 500); 8 Apr 2015 19:01:24 -0000 Mailing-List: contact user-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ambari.apache.org Delivered-To: mailing list user@ambari.apache.org Received: (qmail 76527 invoked by uid 99); 8 Apr 2015 19:01:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 19:01:24 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of greg.hill@rackspace.com designates 173.203.4.135 as permitted sender) Received: from [173.203.4.135] (HELO mx1.ord1.rackspace.com) (173.203.4.135) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 19:00:59 +0000 X-SBRS: None X-SenderGroup: RELAYLIST-US X-MailFlowPolicy: $RELAYED-US X-IronPort-AV: E=McAfee;i="5600,1067,7471"; a="623111127" X-IronPort-AV: E=Sophos;i="5.01,489,1400043600"; d="scan'208,217";a="623111127" Received: from unknown (HELO 544124-OEXCH02.ror-uc.rackspace.com) ([10.13.196.92]) by mx1.ord1.rackspace.com with ESMTP/TLS/AES256-SHA; 08 Apr 2015 14:00:56 -0500 Received: from 543818-OEXCH01.ror-uc.rackspace.com (10.13.196.91) by 544124-OEXCH02.ror-uc.rackspace.com (10.13.196.92) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 8 Apr 2015 14:00:56 -0500 Received: from 543818-OEXCH01.ror-uc.rackspace.com ([fe80::5c15:c66b:3251:9f85]) by 543818-OEXCH01.ror-uc.rackspace.com ([fe80::5c15:c66b:3251:9f85%17]) with mapi id 15.00.1044.021; Wed, 8 Apr 2015 14:00:56 -0500 From: Greg Hill To: "user@ambari.apache.org" Subject: potential bug Thread-Topic: potential bug Thread-Index: AQHQci5XFmW0hMenr066YDZS9VbU9g== Date: Wed, 8 Apr 2015 19:00:55 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.13.196.1] Content-Type: multipart/alternative; boundary="_000_D14AE51915924greghillrackspacecom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_D14AE51915924greghillrackspacecom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm diagnosing an issue, and I think I found a bug with the ambari-agent co= de: https://github.com/apache/ambari/blob/trunk/ambari-agent/src/main/python/am= bari_agent/Controller.py#L390 If 'cluster_name' has spaces in it, this request fails because it fails to = URL-encode value. This causes all of the agents to go to HEARTBEAT_LOST st= ate and everything fails, but the error it spits out in the agent log is hu= gely misleading: ERROR 2015-04-08 18:30:20,312 Controller.py:140 - Unable to connect to: htt= ps://ambari.local:8441/agent/v1/register/ambari.local Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line = 128, in registerWithServer self.addToStatusQueue(ret['statusCommands']) File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line = 172, in addToStatusQueue self.updateComponents(commands[0]['clusterName']) File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line = 360, in updateComponents response =3D self.sendRequest(self.componentsUrl + cluster_name, None) File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line = 353, in sendRequest + '; Response: ' + str(response)) IOError: Response parsing failed! Request data: None; Response: It connected fine, and parsed the response fine, but then died during proce= ssing of the response. Probably shouldn't be trapping every Exception here= : https://github.com/apache/ambari/blob/trunk/ambari-agent/src/main/python/am= bari_agent/Controller.py#L170 I assume that this is a bug and we want to allow cluster names to be whatev= er the customer would like. I'll open a JIRA unless someone can disconfirm that this is a bug. Greg --_000_D14AE51915924greghillrackspacecom_ Content-Type: text/html; charset="us-ascii" Content-ID: <6FD3F97DDD62F849AEF5C6DF6F9E7400@rackspace.com> Content-Transfer-Encoding: quoted-printable
I'm diagnosing an issue, and I think I found a bug with the ambari-age= nt code:


If 'cluster_name' has spaces in it, this request fails because it fail= s to URL-encode value.  This causes all of the agents to go to HEARTBE= AT_LOST state and everything fails, but the error it spits out in the agent= log is hugely misleading:

ERROR 2015-04-08 18:30:20,312 Controller.py:140 - Unable to connect to= : https://ambari.local:8441/agent/v1/register/ambari.local
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/Contro= ller.py", line 128, in registerWithServer
    self.addToStatusQueue(ret['statusCommands'])
  File "/usr/lib/python2.6/site-packages/ambari_agent/Contro= ller.py", line 172, in addToStatusQueue
    self.updateComponents(commands[0]['clusterName'])
  File "/usr/lib/python2.6/site-packages/ambari_agent/Contro= ller.py", line 360, in updateComponents
    response =3D self.sendRequest(self.componentsUrl + c= luster_name, None)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Contro= ller.py", line 353, in sendRequest
    + '; Response: ' + str(response))
IOError: Response parsing failed! Request data: None; Response:

It connected fine, and parsed the response fine, but then died during = processing of the response.  Probably shouldn't be trapping every Exce= ption here:


I assume that this is a bug and we want to allow cluster names to be w= hatever the customer would like.  

I'll open a JIRA unless someone can disconfirm that this is a bug.

Greg
--_000_D14AE51915924greghillrackspacecom_--