Hmm, so 503 is also returned by haproxy if no server is available to
service a request (example for a backend with no servers or if the server
is not available failing the health check).  As I recall, we did the error
page on a request as it gives the ability to override it in a custom
template.

Now that said, if the app (server associated with a haproxy backend) is
returning 503s, that content should get passed back as is. Meaning you
should see your custom error page being returned back to the server.

I just tested this out with a repo I have:
https://github.com/ramr/nodejs-header-echo/blob/master/server.js#L12
and it returns the content + status code back to the requester.

If that's not the case - from what you are seeing, it is more than likely
that haproxy has marked the backend server down as unavailable - which
means its failing health checks.

Is your server always returning 503 - example for a GET/HEAD on / ? That
could cause haproxy to mark it as down.

You can also see the stats in haproxy to look at if the server has been
marked down:
    cmd="echo 'show stat' | socat
unix-connect:/var/lib/haproxy/run/haproxy.sock stdio"
    echo "$cmd"  | oc rsh <router-pod-name>    #  replace with router pod
name.

HTH


On Tue, Jun 7, 2016 at 12:56 PM, Philippe Lafoucrière <
philippe.lafoucri...@tech-angels.com> wrote:

>
> On Tue, Jun 7, 2016 at 3:46 PM, Luke Meyer <lme...@redhat.com> wrote:
>
>> It sounds like what he wants is for the router to simply not interfere
>> with passing along something that's already returning a 503. It sounds like
>> haproxy is replacing the page content with its own in that use case.
>
>
> THANKS Luke :))
> I don't want to change the router, I just want it to point to a specific
> service returning 503 for most URLs.
> On the other hand, the SAME router is used (with another route) to point
> to the production service, with a different URL if we want to test the
> change.
> Imagine a migration from pg 9.4 to 9.5, you have to shutdown your site.
> That doesn't mean traffic can't be routed any more, we like to test the
> site after the migration, and before resuming all the public traffic.
>
>


-- 
Ram//
main(O,s){s=--O;10<putchar(3^O?97-(15&7183>>4*s)*(O++?-1:1):10)&&\
main(++O,s++);}
_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to