Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B707817F2F for ; Tue, 31 Mar 2015 20:50:54 +0000 (UTC) Received: (qmail 79675 invoked by uid 500); 31 Mar 2015 20:50:54 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 79643 invoked by uid 500); 31 Mar 2015 20:50:54 -0000 Mailing-List: contact dev-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 dev@ambari.apache.org Received: (qmail 79631 invoked by uid 99); 31 Mar 2015 20:50:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2015 20:50:54 +0000 Date: Tue, 31 Mar 2015 20:50:54 +0000 (UTC) From: "Hudson (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-4782) Error in getting host components with state INSTALL_FAILED 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-4782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14389384#comment-14389384 ] Hudson commented on AMBARI-4782: -------------------------------- SUCCESS: Integrated in Ambari-trunk-Commit #2160 (See [https://builds.apache.org/job/Ambari-trunk-Commit/2160/]) Revert "AMBARI-4782. Error in getting host components with state INSTALL_FAILED.(vbrodetskyi)" (ncole: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=af5a151ab63e3f47d01208fbb6dd77ab4339ee25) * ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java * ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java * ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java * ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java * ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java > Error in getting host components with state INSTALL_FAILED > ---------------------------------------------------------- > > Key: AMBARI-4782 > URL: https://issues.apache.org/jira/browse/AMBARI-4782 > Project: Ambari > Issue Type: Task > Components: ambari-server, test > Affects Versions: 1.3.0 > Reporter: Dmitry Lysnichenko > Assignee: Vitaly Brodetskyi > Fix For: 2.1.0 > > Attachments: AMBARI-4782.patch > > > h2. The problem > When try to get query on api/v1/clusters//host_components?HostRoles/state=INSTALL_FAILED > Response is > { "status" : 400, "message" : "Invalid Request: Invalid arguments, invalid desired state, desiredState=INSTALL_FAILED" } > This issue is rooted at the over all issue Ambari has where when "state" is specified in the API requests it is always interpreted as "desired_state". And INSTALL_FAILED is an invalid "desired_state". Just fixing the GET calls to interpret request:state as "state" (current state of a host component) might be the right thing to do but will make the get calls to behave differently than other calls. For example, request to set all component which are in INSTALL_FAILED state to INIT (or MAINTENANCE) will not work as expected. > h2. The proposal: > The fix is to distinguish between "current_state" and "desired_state" and promote "current_state" as a first class query parameter. "state" query parameter will be still mapped to "desired_state" to maintain backward compatibility. -- This message was sent by Atlassian JIRA (v6.3.4#6332)