summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-12-09 09:58:53 -0600
committerEric Fried <openstack@fried.cc>2019-12-09 11:52:49 -0600
commite6f742544432d6066f1fba4666580919eb7859bd (patch)
tree8a1be4811bbcaa336b66c525197ed5bf820f966e /api-ref
parente937c5c6c47658e695b1e934b3d6e660dc6514ed (diff)
downloadnova-e6f742544432d6066f1fba4666580919eb7859bd.tar.gz
Nix os-server-external-events 404 condition
The POST /os-server-external-events API had the following confusing behavior: With multiple events in the payload, if *some* (but not all) were dropped, the HTTP response was 207, with per-event 4xx error codes in the payload. But if *all* of the events were dropped, the overall HTTP response was 404 with no payload. Thus, especially for consumers sending only one event at a time, it was impossible to distinguish e.g. "you tried to send an event for a nonexistent instance" from "the instance you specified hasn't landed on a host yet". This fix gets rid of that sweeping 404 condition, so if *any* subset of the events are dropped (including *all* of them), the HTTP response will always be 207, and the payload will always contain granular per-event error codes. This effectively means the API can no longer return 404, ever. Closes-Bug: #1855752 Change-Id: Ibad1b51e2cf50d00102295039b6e82bc00bec058
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/os-server-external-events.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/api-ref/source/os-server-external-events.inc b/api-ref/source/os-server-external-events.inc
index f04c98839f..d96bc26396 100644
--- a/api-ref/source/os-server-external-events.inc
+++ b/api-ref/source/os-server-external-events.inc
@@ -32,11 +32,15 @@ updated ``code`` and ``status`` indicating their level of success.
Normal response codes: 200, 207
A 200 will be returned if all events succeeded, 207 will be returned
-if some events could not be processed. The ``code`` attribute for the
+if any events could not be processed. The ``code`` attribute for the
event will explain further what went wrong.
-Error response codes: badRequest(400), unauthorized(401), forbidden(403),
-itemNotFound(404)
+Error response codes: badRequest(400), unauthorized(401), forbidden(403)
+
+.. note:: Prior to the fix for `bug 1855752`_, error response code 404 may be
+ erroneously returned when all events failed.
+
+.. _bug 1855752: https://bugs.launchpad.net/nova/+bug/1855752
Request
-------