[nova][dev] Which response code should be returned when migrate is called but the src host is offline?
although i don't know the nova internals that well, i will respond
with my sig api hat on.
On Tue, Feb 12, 2019 at 1:28 PM Matthew Booth <mbooth at redhat.com> wrote:
> I don't think it means n-api is at fault, I think it means that nova,
> as a whole, is temporarily unable to fulfil the request for reasons
> which can't be resolved using the API, but might be fixed if you wait
> a bit. The weird thing about this specific request is that, being an
> admin api, the person you might be waiting on to fix it might be
> yourself. It's still OOB, though: compute host down isn't something
> you can fix using the API. 409 to me means you raced with something,
> or something is in the wrong state, and you need to go do other things
> with the API before coming back here and trying again. 503 to me means
> we can't do it no matter what you do because, well, 'Service
> Unavailable'. Which it is, because the compute host is down.
i tend to concur with this reading as well. for me, when thinking
about status codes in general i like to keep this in miind: 4xx means
something has gone wrong but the client might be able to fix it by
changing the request (this could mean many things), 5xx means that
something has gone wrong on the server-side and continued requests
will not "fix it".
so, under the given example, i would expect a 5xx status code if the
server is unable to respond to my request /regardless/ of how i format
it or what uri i am accessing.
just 2 more c to the pile =)