← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1638703] Re: OVO vif_details not loading correctly from DB

 

Reviewed:  https://review.openstack.org/392960
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=660946a921ce41b196533fe49d0df4e5a479eea0
Submitter: Jenkins
Branch:    master

commit 660946a921ce41b196533fe49d0df4e5a479eea0
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date:   Wed Nov 2 13:45:10 2016 -0700

    Fix modify_fields_from_db for vif_details empty str
    
    vif_details is represented as an empty string in our DB schema
    when it's not defined. The 'modify_fields_from_db' method was
    incorrectly attempting to feed this directly into the json decoder.
    
    Closes-Bug: #1638703
    Change-Id: I7b13fb30de71bb4dce4dbab4ffe430e1d0ef8f3a


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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


References