Shared-Migration and Block-Migration are reversed

Bug #1518059 reported by Ryan Baker
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Vladislav Belogrudov

Bug Description

When running a live migration, it appears that the --shared-migration actually tries to perform a block migration, and the --block-migration tries to perform a shared storage migration.

This is the webservice call with the --shared-migration flag:

POST http://<ip>:8774/v2/43250decfdbe4922b1369b39d7ac4ff4/servers/a37b3339-23b9-4046-9b39-6f642a9f7cd9/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -d '{"os-migrateLive": {"disk_over_commit": false, "block_migration": true, "host": "compute2.lab.com"}}

Which errors out with the following:

BadRequest: compute1.lab.com is not on local storage: Block migration can not be used with shared storage. (HTTP 400) (Request-ID: req-5c37af70-6565-48a1-9cdf-d55b18ce19bc)

And here is the webservice call with the --block-migration

curl -i -X POST http://<ip>:8774/v2/43250decfdbe4922b1369b39d7ac4ff4/servers/a37b3339-23b9-4046-9b39-6f642a9f7cd9/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -d '{"os-migrateLive": {"disk_over_commit": false, "block_migration": false, "host": "compute2.lab.com"}}

Changed in python-openstackclient:
assignee: nobody → Ryan Baker (ryan-andrew-baker)
Revision history for this message
Steve Martinelli (stevemar) wrote :
Revision history for this message
Ryan Baker (ryan-andrew-baker) wrote :

I reviewed that bug before submitting, however, it doesn't appear to even mention that there is a bug in how the shared/block migrations are actually called. Furthermore, the primary point of that bug was to fix the live migration so that it doesn't have to specify a compute host to migrate the instance to. Unfortunately, because the shared/block migration functionality was tagged in to bug, it hasn't been resolved as there appears to be some sticking points around the code for the actual bug issue.

I have the code complete for this and have tested in our environment, just trying to figure out the contribution process, as this is my first contribution.

Revision history for this message
Steve Martinelli (stevemar) wrote :

thanks for the explanation ryan, let me know if you have any trouble with the contribution process, the steps are outlined here: http://docs.openstack.org/infra/manual/developers.html

alternatively, you could post a patch to launchpad

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Steve Martinelli (stevemar) wrote :

Automatically unassigning due to inactivity.

Changed in python-openstackclient:
assignee: Ryan Baker (ryan-andrew-baker) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-openstackclient (master)

Change abandoned by Steve Martinelli (<email address hidden>) on branch: master
Review: https://review.openstack.org/251538
Reason: this has not been touched in >6 months, auto abandoning

Changed in python-openstackclient:
status: Triaged → Incomplete
Changed in python-openstackclient:
assignee: nobody → Vladislav Belogrudov (vlad-belogrudov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/385138
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=694a24c3093f5b2595b63ccf988da7972e532084
Submitter: Jenkins
Branch: master

commit 694a24c3093f5b2595b63ccf988da7972e532084
Author: Cedric Brandily <email address hidden>
Date: Tue Oct 11 22:01:16 2016 +0200

    Fix --shared/block-migration options in server migrate command

    Currently, --shared-migration and --block-migration options effects are
    reversed: --block-migration requests a migration with share,
    --shared-migration a block-migration.

    This change corrects OSC implementation and clarifies arguments passed
    to novaclient (the root cause of the bug).

    Change-Id: Ib682cff0c44d3b1304670f8606907b1762d8b1e7
    Closes-Bug: #1518059

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-openstackclient (master)

Change abandoned by Vladislav Belogrudov (<email address hidden>) on branch: master
Review: https://review.openstack.org/387451
Reason: has already been fixed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.4.0

This issue was fixed in the openstack/python-openstackclient 3.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/480595

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (stable/newton)

Reviewed: https://review.openstack.org/480595
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=537b085c8e3442e85058f0398f2a578d2d414bac
Submitter: Jenkins
Branch: stable/newton

commit 537b085c8e3442e85058f0398f2a578d2d414bac
Author: Cedric Brandily <email address hidden>
Date: Tue Oct 11 22:01:16 2016 +0200

    Fix --shared/block-migration options in server migrate command

    Currently, --shared-migration and --block-migration options effects are
    reversed: --block-migration requests a migration with share,
    --shared-migration a block-migration.

    This change corrects OSC implementation and clarifies arguments passed
    to novaclient (the root cause of the bug).

    Change-Id: Ib682cff0c44d3b1304670f8606907b1762d8b1e7
    Closes-Bug: #1518059
    (cherry picked from commit 694a24c3093f5b2595b63ccf988da7972e532084)

tags: added: in-stable-newton
Revision history for this message
Lars Erik Pedersen (pedersen-larserik) wrote :

The UCA for stable/newton still has python-openstackclient 3.2.0. Can this fix be backported?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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