TypeError: live_migrate_instance() got an unexpected keyword argument 'async'

Bug #1604475 reported by Lauren Taylor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Andrew Laski

Bug Description

During live migration, this unexpected API error occur. The live migration failed.

Error in the nova-api.log:
2016-07-19 02:52:59.734 3825 INFO nova.osapi_compute.wsgi.server [req-7ecad794-1fea-4815-a9d9-5fe2ab829c53 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 a3b6f61367f64e23aad54feb8255f4c1 - - -] 9.109.223.198,127.0.0.1 "GET /v2.1/a3b6f61367f64e23aad54feb8255f4c1/storage-viable-hosts?instance_uuid=5b7cb076-53ca-47b6-891a-95ff00d6dd70 HTTP/1.1" status: 200 len: 443 time: 0.1453900
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions [req-c2bf4983-fc1f-415e-9011-4f626972db87 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 a3b6f61367f64e23aad54feb8255f4c1 - - -] Unexpected exception in API method
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 338, in wrapped
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/migrate_server.py", line 100, in _migrate_live
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions disk_over_commit, host, force)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 165, in inner
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 172, in _wrapped
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 146, in inner
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions return f(self, context, instance, *args, **kw)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 3322, in live_migrate
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions request_spec=request_spec, async=async)
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions TypeError: live_migrate_instance() got an unexpected keyword argument 'async'
2016-07-19 02:53:03.764 3827 ERROR nova.api.openstack.extensions
2016-07-19 02:53:03.766 3827 INFO nova.api.openstack.wsgi [req-c2bf4983-fc1f-415e-9011-4f626972db87 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 a3b6f61367f64e23aad54feb8255f4c1 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.TypeError'>

The issue appears to be caused by this changeset: https://review.openstack.org/#/c/311116/

While the 'async' argument was added to the conductor's ComputeTaskAPI.live_migrate_instance, the 'async' argument was not added to the conductor's LocalComputeTaskAPI.live_migrate_instance.

My current Nova config file has this set:

[conductor]
use_local = True

Tags: conductor
Lauren Taylor (lmtaylor)
Changed in nova:
assignee: nobody → Lauren Taylor (lmtaylor)
Lauren Taylor (lmtaylor)
Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
tags: added: conductor
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Andrew Laski (<email address hidden>) on branch: master
Review: https://review.openstack.org/344403
Reason: Abandoned in favor of https://review.openstack.org/#q,Ida6c8ca1d7a832cb52595645eff5d8149e65cdf7,n,z

Matt Riedemann (mriedem)
Changed in nova:
assignee: Lauren Taylor (lmtaylor) → Andrew Laski (alaski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Lauren Taylor (<email address hidden>) on branch: master
Review: https://review.openstack.org/344429

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/344403
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a7f83fc6cec74cc614182b6d931521ded3f54ff2
Submitter: Jenkins
Branch: master

commit a7f83fc6cec74cc614182b6d931521ded3f54ff2
Author: Andrew Laski <email address hidden>
Date: Tue Jul 19 14:26:53 2016 -0400

    Add async param to local conductor live_migrate_instance

    A new async param was added to the RPC version of live_migrate_instance
    in the conductor but it was missed on the local conductor API. This adds
    that parameter and adds a unit test that uses the parameter.

    Change-Id: I7c44a8fc72ba9afbb67269b0bc7ad59eb9b1580e
    Closes-Bug: #1604475

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.0.0b3

This issue was fixed in the openstack/nova 14.0.0.0b3 development milestone.

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.