Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-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 74DAD17BAE for ; Wed, 15 Apr 2015 17:30:00 +0000 (UTC) Received: (qmail 71831 invoked by uid 500); 15 Apr 2015 17:30:00 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 71787 invoked by uid 500); 15 Apr 2015 17:30:00 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 71768 invoked by uid 99); 15 Apr 2015 17:30:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2015 17:30:00 +0000 Date: Wed, 15 Apr 2015 17:30:00 +0000 (UTC) From: "Xuan Gong (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-2605) [RM HA] Rest api endpoints doing redirect incorrectly 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/YARN-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuan Gong updated YARN-2605: ---------------------------- Issue Type: Sub-task (was: Bug) Parent: YARN-149 > [RM HA] Rest api endpoints doing redirect incorrectly > ----------------------------------------------------- > > Key: YARN-2605 > URL: https://issues.apache.org/jira/browse/YARN-2605 > Project: Hadoop YARN > Issue Type: Sub-task > Components: resourcemanager > Affects Versions: 2.4.0 > Reporter: bc Wong > Assignee: Anubhav Dhoot > Labels: newbie > > The standby RM's webui tries to do a redirect via meta-refresh. That is fine for pages designed to be viewed by web browsers. But the API endpoints shouldn't do that. Most programmatic HTTP clients do not do meta-refresh. I'd suggest HTTP 303, or return a well-defined error message (json or xml) stating that the standby status and a link to the active RM. > The standby RM is returning this today: > {noformat} > $ curl -i http://bcsec-1.ent.cloudera.com:8088/ws/v1/cluster/metrics > HTTP/1.1 200 OK > Cache-Control: no-cache > Expires: Thu, 25 Sep 2014 18:34:53 GMT > Date: Thu, 25 Sep 2014 18:34:53 GMT > Pragma: no-cache > Expires: Thu, 25 Sep 2014 18:34:53 GMT > Date: Thu, 25 Sep 2014 18:34:53 GMT > Pragma: no-cache > Content-Type: text/plain; charset=UTF-8 > Refresh: 3; url=http://bcsec-2.ent.cloudera.com:8088/ws/v1/cluster/metrics > Content-Length: 117 > Server: Jetty(6.1.26) > This is standby RM. Redirecting to the current active RM: http://bcsec-2.ent.cloudera.com:8088/ws/v1/cluster/metrics > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)