server action doesn't work for some cases

Bug #1528145 reported by Yanyan Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Fix Released
Undecided
Yanyan Hu

Bug Description

For cases where nova server action API doesn't have resp body(e.g. server resize), the current server action resource call doesn't work. The following error will be raised:

2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/openstack_repo/openstack/python-openstacksdk/openstack/compute/v2/_proxy.py", line 519, in resize_server
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk server.resize(self.session, flavor)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/openstack_repo/openstack/python-openstacksdk/openstack/compute/v2/server.py", line 135, in resize
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk return self.action(session, body)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/openstack_repo/openstack/python-openstacksdk/openstack/compute/v2/server.py", line 100, in action
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk return resp.json()
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/python/virtualenv/SENLINENV/lib/python2.7/site-packages/requests/models.py", line 805, in json
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk return complexjson.loads(self.text, **kwargs)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/python/virtualenv/SENLINENV/lib/python2.7/site-packages/simplejson/__init__.py", line 516, in loads
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk return _default_decoder.decode(s)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/python/virtualenv/SENLINENV/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk obj, end = self.raw_decode(s)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk File "/home/stack/huyanyan/python/virtualenv/SENLINENV/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk return self.scan_once(s, idx=_w(s, idx).end())
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2015-12-21 03:38:12.419 8511 TRACE senlin.drivers.openstack.sdk
2015-12-21 03:38:12.424 8511 ERROR senlin.profiles.os.nova.server [req-166338ad-f1f5-431b-bc7a-12f2a77b525e 9336ef68abd74b6eb2b97a7cd54e81e0 1d567ed4ef51453a85545f018b68c26d - - - None] Failed in updating server flavor: Expecting value: line 1 column 1 (char 0)

Yanyan Hu (yanyanhu)
Changed in python-openstacksdk:
assignee: nobody → Yanyan Hu (yanyanhu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

Fix proposed to branch: master
Review: https://review.openstack.org/259914

Changed in python-openstacksdk:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/259914
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=b37bced0e7279c9974452d9ac2838f6ca8429b2f
Submitter: Jenkins
Branch: master

commit b37bced0e7279c9974452d9ac2838f6ca8429b2f
Author: yanyanhu <email address hidden>
Date: Mon Dec 21 04:33:37 2015 -0500

    Fix server action resource call

    Currently, action resource call of nova server doesn't work
    correctly in case where action API doesn't have response body.
    This patch fixes this issue.

    Change-Id: I016f74507f7d5b5792c77879969bdc271c25f829
    Closes-Bug: #1528145

Changed in python-openstacksdk:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.