Server will be cold-migrated even if users specify "--block-migration".

Bug #1662755 reported by Rikimaru Honjo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Rikimaru Honjo

Bug Description

[Bug]
I ran following command to block-migrate a server.

$ openstack server migrate --block-migration <server>

But, the server was cold-migrated as a result.

"server migrate" sub command ignores "--block-migration" if user don't specify "--live".
IMO, this is too unkind for users who'd like to block-migrate servers.

[Solutions]
IMO, there are two solutions.
Which is better?

Solution No.1:
Add checks.
If user specify "--block-migration" or "--shared-migration" without specifying "--live", openstackclient only output a caution.

Solution No.2:
Modify conditional branches.
If user specify "--block-migration" or "--shared-migration" without specifying "--live", openstackclient live/block-migrate servers.

Changed in python-openstackclient:
assignee: nobody → Rikimaru Honjo (honjo-rikimaru-c6)
Tom Fifield (fifieldt)
Changed in python-openstackclient:
status: New → Confirmed
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/439451

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

Reviewed: https://review.openstack.org/439451
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=7063ffb3cacadbaf2e47c4e6d7b2cf8d694c83a7
Submitter: Jenkins
Branch: master

commit 7063ffb3cacadbaf2e47c4e6d7b2cf8d694c83a7
Author: Rikimaru Honjo <email address hidden>
Date: Thu Feb 23 16:59:26 2017 +0900

    Add a validation about options for server migrate command

    The behavior of server migrate command are different depending on
    whether user specify --live option or not.
    server migrate command will call live migration API if user specify
    --live option.
    Ohterwise server migrate command will call migration(cold migration)
    API.

    Now then, "--block-migraiton" option and "--disk-overcommit" option
    only affect live-migration.
    But, openstackclient doesn't warn user if user specify these options
    without "--live".
    But, user can't recognize that specifying options are ignored.

    This patch adds a validation that checks whether or not user specify
    these options without "--live".

    Change-Id: Ifa278abb23ecdba4b13f3742998359ac74eb7ad4
    Closes-bug: #1662755

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

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

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.