Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5874D18CD8 for ; Mon, 21 Dec 2015 16:54:02 +0000 (UTC) Received: (qmail 23748 invoked by uid 500); 21 Dec 2015 16:54:02 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 23700 invoked by uid 500); 21 Dec 2015 16:54:02 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 23676 invoked by uid 99); 21 Dec 2015 16:54:02 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Dec 2015 16:54:02 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id A10722958B6; Mon, 21 Dec 2015 16:54:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6360943802022239299==" MIME-Version: 1.0 Subject: Re: Review Request 41534: Update leader redirection logic to return an error page if there is no leading scheduler. From: "Aurora ReviewBot" To: "Bill Farner" , "Maxim Khutornenko" Cc: "Joshua Cohen" , "Aurora" , "Aurora ReviewBot" Date: Mon, 21 Dec 2015 16:54:01 -0000 Message-ID: <20151221165401.663.88926@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Aurora ReviewBot" X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/41534/ X-Sender: "Aurora ReviewBot" References: <20151221164002.664.28661@reviews.apache.org> In-Reply-To: <20151221164002.664.28661@reviews.apache.org> Reply-To: "Aurora ReviewBot" X-ReviewRequest-Repository: aurora --===============6360943802022239299== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41534/#review111492 ----------------------------------------------------------- Ship it! Master (5183fe0) is green with this patch. ./build-support/jenkins/build.sh I will refresh this build result if you post a review containing "@ReviewBot retry" - Aurora ReviewBot On Dec. 21, 2015, 4:40 p.m., Joshua Cohen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41534/ > ----------------------------------------------------------- > > (Updated Dec. 21, 2015, 4:40 p.m.) > > > Review request for Aurora, Maxim Khutornenko and Bill Farner. > > > Repository: aurora > > > Description > ------- > > We'd like to serve Aurora through DNS rather than against the singleton serverset so that when there is no leader users get a friendly error page rather than a generic error (which inevitably leads to them coming to ask for support). In order to accomplish this, I've updated the `LeaderRedirectFilter` to return a 503 with an html body in the event there is no elected leader. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java 2c86ddb0a44bcec03cd9305fa96201c214fc731c > src/main/java/org/apache/aurora/scheduler/http/LeaderRedirectFilter.java 51566e9ccddfd4921ba33f0ecfbf303fdab31549 > src/main/resources/org/apache/aurora/scheduler/http/no-leader.html PRE-CREATION > src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java 152af0d511fdc26906a3f7428024e5af08daab6d > src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java 98b6ef6304521c5f99a187e1c6d83a135e4cfabd > src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java af1e5f1c4c82ab2450c1487af67bc8907675822c > > Diff: https://reviews.apache.org/r/41534/diff/ > > > Testing > ------- > > ./gradlew build -Pq > > Also verified in Vagrant (by preventing the scheduler from leading) that accessing the scheduler in that state returns the expected page. > Additionally verified that client error message is still usable: > > WARN] Connection error with scheduler: Unknown error talking to http://192.168.33.7:8081/api: 503 Server Error: Service Unavailable, reconnecting... > > > File Attachments > ---------------- > > No Leader page > https://reviews.apache.org/media/uploaded/files/2015/12/17/2759a88b-a2c4-4c45-a45f-037126e30f1e__Screen_Shot_2015-12-17_at_5.02.51_PM.png > > > Thanks, > > Joshua Cohen > > --===============6360943802022239299==--