Skip to content

Commit 537b085

Browse files
ZZellesnecklifter
authored andcommitted
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 694a24c)
1 parent f4764d6 commit 537b085

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎openstackclient/compute/v2/server.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -975,15 +975,15 @@ def get_parser(self, prog_name):
975975
migration_group = parser.add_mutually_exclusive_group()
976976
migration_group.add_argument(
977977
'--shared-migration',
978-
dest='shared_migration',
979-
action='store_true',
980-
default=True,
978+
dest='block_migration',
979+
action='store_false',
980+
default=False,
981981
help=_('Perform a shared live migration (default)'),
982982
)
983983
migration_group.add_argument(
984984
'--block-migration',
985-
dest='shared_migration',
986-
action='store_false',
985+
dest='block_migration',
986+
action='store_true',
987987
help=_('Perform a block live migration'),
988988
)
989989
disk_group = parser.add_mutually_exclusive_group()
@@ -1018,9 +1018,9 @@ def take_action(self, parsed_args):
10181018
)
10191019
if parsed_args.live:
10201020
server.live_migrate(
1021-
parsed_args.live,
1022-
parsed_args.shared_migration,
1023-
parsed_args.disk_overcommit,
1021+
host=parsed_args.live,
1022+
block_migration=parsed_args.block_migration,
1023+
disk_over_commit=parsed_args.disk_overcommit,
10241024
)
10251025
else:
10261026
server.migrate()

0 commit comments

Comments
 (0)