← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1638703] [NEW] OVO vif_details not loading correctly from DB

 

Public bug reported:

The modify_fields_from_db method for the port binding OVO does not work
correctly with 'vif_details'. The json parser falls apart when it
encounters the empty details case, which is represented in our DB schema
as an empty string ''.

    obj_fields = self._test_class.modify_fields_from_db(db_obj)
  File "neutron/objects/ports.py", line 66, in modify_fields_from_db
    fields['vif_details'] = jsonutils.loads(fields['vif_details'])
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_serialization/jsonutils.py", line 241, in loads
    return json.loads(encodeutils.safe_decode(s, encoding), **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Ran 2 (-269) tests in 1.157s (-41.866s)

** Affects: neutron
     Importance: Undecided
     Assignee: Kevin Benton (kevinbenton)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => Kevin Benton (kevinbenton)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1638703

Title:
  OVO vif_details not loading correctly from DB

Status in neutron:
  In Progress

Bug description:
  The modify_fields_from_db method for the port binding OVO does not
  work correctly with 'vif_details'. The json parser falls apart when it
  encounters the empty details case, which is represented in our DB
  schema as an empty string ''.

      obj_fields = self._test_class.modify_fields_from_db(db_obj)
    File "neutron/objects/ports.py", line 66, in modify_fields_from_db
      fields['vif_details'] = jsonutils.loads(fields['vif_details'])
    File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_serialization/jsonutils.py", line 241, in loads
      return json.loads(encodeutils.safe_decode(s, encoding), **kwargs)
    File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
      return _default_decoder.decode(s)
    File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
      raise ValueError("No JSON object could be decoded")
  ValueError: No JSON object could be decoded
  Ran 2 (-269) tests in 1.157s (-41.866s)

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1638703/+subscriptions


Follow ups