Redirection to offline.html on 503s

Bug #475371 reported by Björn Tillenius
56
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Gary Poster

Bug Description

When a 503 happens (for example when LP is down for maintenance), you
get redirected to https://launchpad.net/offline.html. This is annoying,
since you can no longer reload the page to see whether LP is up again.
You also have lost the URL you were planning to go to, so you have to
type in the URL again, which is not always feasible.

The current https://launchpad.net/offline.html is also returning 200
instead of 503.

We should resurrect the old behaviour, where we didn't redirect to a new
page, but rather displayed the contents of offline.html in place of the
real page, keeping the URL, and status code as 503.

    affects launchpad-foundations

Related branches

Revision history for this message
Stuart Bishop (stub) wrote :

Losas need to investigate if HAProxy supports this.

If not we should raise a bug or feature request upstream.

We can't do anything in the Launchpad codebase to address this issue - this is about how our load balancer reacts when Launchpad is not operational.

Revision history for this message
Tom Haddon (mthaddon) wrote :

This is because we're using haproxy's errorloc directive (see http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt). The alternative is to use errorfile, but that has the following warnings, per the docs:

 - The files are loaded while parsing configuration, before doing a chroot().
   Thus, they are relative to the real filesystem. For this reason, it is
   recommended to pass an absolute path to those files.

 - The contents of those files is not HTML, but real HTTP protocol with
   possible HTML body. So the first line and headers are mandatory. Ideally,
   every line in the HTTP part should end with CR-LF for maximum compatibility.

 - The response is limited to the buffer size (BUSIZE), generally 8 or 16 kB.

 - The response should not include references to the local server, in order to
   avoid infinite loops on the browser in case of local failure.

We'll therefore need new files added to the tree following this specification that we can use for haproxy. Note that we don't want to change the current files (since we need them for apache errors), we just need to add new ones that match these criteria. Once this has been done we can setup haproxy to return them as appropriate.

Changed in launchpad-foundations:
status: New → Confirmed
importance: Undecided → High
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
status: Confirmed → Triaged
Revision history for this message
Stuart Bishop (stub) wrote :

Per Bug #504199, this makes Launchpad API clients explode as they get a 200 success code with invalid (to them) content.

Changed in launchpad-foundations:
milestone: none → 10.01
Gary Poster (gary)
Changed in launchpad-foundations:
assignee: nobody → Gary Poster (gary)
status: Triaged → In Progress
Gary Poster (gary)
Changed in launchpad-foundations:
status: In Progress → Fix Released
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 475371] Re: Redirection to offline.html on 503s

On Fri, 26 Feb 2010 18:06:58 -0000, Gary Poster <email address hidden> wrote:
> ** Changed in: launchpad-foundations
> Status: In Progress => Fix Released

Thanks, much appreciated.

James

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.