← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1669084] [NEW] vendordata v2 will fail on a 204 response

 

Public bug reported:

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__.

** Affects: nova
     Importance: Medium
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged


** Tags: metadata vendordata

-- 
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):
  Triaged

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


Follow ups