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 09D9B11EB3 for ; Thu, 21 Aug 2014 17:42:24 +0000 (UTC) Received: (qmail 93535 invoked by uid 500); 21 Aug 2014 17:42:23 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93502 invoked by uid 500); 21 Aug 2014 17:42:23 -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 93491 invoked by uid 99); 21 Aug 2014 17:42:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2014 17:42:23 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=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.136 as permitted sender) Received: from [173.203.4.136] (HELO mx2.ord1.rackspace.com) (173.203.4.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2014 17:41:58 +0000 X-SBRS: None X-SenderGroup: RELAYLIST-US X-MailFlowPolicy: $RELAYED-US X-IronPort-AV: E=McAfee;i="5600,1067,7471"; a="336235816" X-IronPort-AV: E=Sophos;i="5.01,489,1400043600"; d="scan'208";a="336235816" Received: from ord1exh01.rackspace.corp ([10.12.120.25]) by mx2.ord1.rackspace.com with ESMTP/TLS/AES128-SHA; 21 Aug 2014 12:41:56 -0500 Received: from ORD1EXD03.RACKSPACE.CORP ([fe80::d4ae:52ff:fee6:5d8b]) by ORD1EXH01.RACKSPACE.CORP ([::1]) with mapi id 14.03.0123.003; Thu, 21 Aug 2014 12:41:28 -0500 From: Greg Hill To: "dev@ambari.apache.org" Subject: Re: setting maintenance mode doesn't return a request id Thread-Topic: setting maintenance mode doesn't return a request id Thread-Index: AQHPvWPI4NkVdKKNzUWS/daIklaufJvbonaA//+xKQA= Date: Thu, 21 Aug 2014 17:41:28 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.27.20.41] Content-Type: text/plain; charset="us-ascii" Content-ID: <474956EF769F3F40A56C1ED564B89B42@RACKSPACE.CORP> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I guess I'm confused then. It triggers a background task that takes 17s to complete according to the UI, but returns immediately. Is the UI wrong? It definitely isn't immediate; it has to wait for it to update nagios before it's safe to proceed doing destructive things. Greg On 8/21/14 12:24 PM, "Siddharth Wagle" wrote: >Hi Greg, > >A response to a POST request will have a body with the (request id) only >if >the POST request triggers a asynchronous operation and the request id is a >way of tracking the operation. > >Putting a host in Maintenance mode is not an async op, so this is working >as expected. > >Regards, >Sid > > >On Thu, Aug 21, 2014 at 10:17 AM, Greg Hill >wrote: > >> I have two ways that I know of to enable maintenance mode on a host, but >> it seems like neither one returns a request id, where pretty much every >> other API call that generates a request does return an id. Is this a >>bug? >> >> I'm testing against ambari 1.6.1 >> >> PUT=20 >>http://c6401.ambari.apache.org:8080/api/v1/clusters/testcluster/hosts >> {"RequestInfo": {"query": "Hosts/host_name.in(c6404.ambari.apache.org)", >> "context": "Start Maintenance Mode"}, "Body": {"Hosts": >> {"maintenance_state": "ON"}}} >> >> Response is a 200 with an empty response body. >> >> Alternatively: >> >> PUT >>=20 >>http://c6401.ambari.apache.org:8080/api/v1/clusters/testcluster/hosts/c64 >>04.ambari.apache.org/host_components?fields=3DHostRoles/state >> {"RequestInfo": {"context": "Start Maintenance Mode"}, "Body": >> {"HostRoles": {"maintenance_state": "ON"}}} >> >> Same response. 200 OK, no body. >> >> Thanks in advance for any help. >> >> Greg >> > >--=20 >CONFIDENTIALITY NOTICE >NOTICE: This message is intended for the use of the individual or entity >to=20 >which it is addressed and may contain information that is confidential, >privileged and exempt from disclosure under applicable law. If the reader >of this message is not the intended recipient, you are hereby notified >that=20 >any printing, copying, dissemination, distribution, disclosure or >forwarding of this communication is strictly prohibited. If you have >received this communication in error, please contact the sender >immediately=20 >and delete it from your system. Thank You.