yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #61936
[Bug 1669084] Re: vendordata v2 will fail on a 204 response
Reviewed: https://review.openstack.org/439785
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3c1943f8d9974477d88ba94336d94db6c4346e01
Submitter: Jenkins
Branch: master
commit 3c1943f8d9974477d88ba94336d94db6c4346e01
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Wed Mar 1 14:16:29 2017 -0500
Check for 204 case in DynamicVendorData
Before b9587587c2f3d6f871dec07562c16e1d82bc05e6 we were doing
an explicit check on the response status codes, but after
that change, we just rely on the bool override in requests.Reponse
which is True for any repsonse code less than 400. In the 204 case
we won't have response text, so we should handle that before trying
to load the json repsonse text. Because TypeError and ValueError are
handled it would just result in a warning if you got a 204, unless
CONF.api.vendordata_dynamic_failure_fatal was True in which case
it's a failure (as shown in the unit test update here).
Change-Id: Iba95fd0112ae4510ef21fdb44fcb281b14567c07
Closes-Bug: #1669084
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1669084
Title:
vendordata v2 will fail on a 204 response
Status in OpenStack Compute (nova):
Fix Released
Bug description:
https://review.openstack.org/#/c/434339/ changed the logic in the
dynamic vendor data v2 handler such that any successful response is
accepted and tries to load up the response body into json, which will
fail in the 204 case where there is no content to load, so
jsonutils.load will fail with a TypeError or ValueError for None and
'' respectively.
The tests didn't cover this because they are using mock and not
something that models how requests.Response overrides __bool__ /
__nonzero__.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1669084/+subscriptions
References