[openstack-dev] [Nova]Response code with cinder api down

Shawn Hartsock hartsock at acm.org
Fri May 2 09:10:35 UTC 2014


So taking a moment to look at ...
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

500 is a general fault... implying something bad happened and we don't
know how to handle it
503 is a fault implying that the responding server has a problem ...
close but not quite what's happening ...
504 is a fault implying the responding server could not finish due to
some other supporting service having a problem (but implying a proxy
relationship)

I'm afraid I have a third conflicting opinion. I think 504 is a better
fit. But, really nothing really does fit properly. A 500 is probably
fine but a little unsatisfying so I sympathize with your desire to
return something a little more detailed but the fact is nothing in the
w3 descriptions actually do fit.

Hope that helps.

On Fri, May 2, 2014 at 4:34 AM, saki.iwata <sakiwa.1109 at gmail.com> wrote:
> Dear all
>
> Hi my name is Saki Iwata
>
> I'm working on this bug fix.
> https://bugs.launchpad.net/nova/+bug/1239952
> https://review.openstack.org/#/c/86213/
>
> This patch change response code from 400 to 503.
>
> This patch got many reviewed but we can't make a decision.
> To put it simply, which code (500 or 503) should it return?
> Which is better do you think?
> I would like to hear your opinion.
>
>
> opinion of reviewer
> - recommend return 500
> -- GlanceConnectionFailed is returning a generic 500
> -- 503 would be appropriate if Nova was unavailable but
>    Cinder being unavailable would be a 500 from a Nova point of view.
>
> - recommend return 503
> -- This exceptions is handled in the FaultWrapper middleware
>
>
> - my opinion
> -- I think should return 503.
>    500 should be used when  a cause is not known.
>    In this patch, cinder down cause of the exception.
>
> Sincerely, Saki Iwata
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
# Shawn.Hartsock - twitter: @hartsock - plus.google.com/+ShawnHartsock



More information about the OpenStack-dev mailing list