summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorJulie Pichon <jpichon@redhat.com>2018-05-09 17:43:09 +0100
committerJulie Pichon <jpichon@redhat.com>2018-06-05 13:20:35 +0000
commit814ffb2a6f22aed640ba6adad62c1288f917b09a (patch)
tree47ad43741ece97c059ce4746c0b9acd199530c4d /openstackclient
parent6c8967dc8eeea1d64b8b7a17bee1f8d1aa647bed (diff)
downloadpython-openstackclient-814ffb2a6f22aed640ba6adad62c1288f917b09a.tar.gz
Prevent "server migrate --wait" from hanging
Migrate uses the same mechanism in the backend than Resize and so the steps and step names are similar. Currently when using the --wait option with 'migrate', we wait forever because the status won't get to active until the user performs an action. This makes it return on verify_resize status just like 'resize' does, so that the user can perform the next manual step. Change-Id: Ie1aeac52506bc8801f88fd6a6eb4f6094cf20050 Story: 2001994 Task: 19620 (cherry picked from commit de9a6fc0700d821f9fca6bf347407eccd87f0064)
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/compute/v2/server.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index 85c20aee..6734832b 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -1331,6 +1331,7 @@ class MigrateServer(command.Command):
if utils.wait_for_status(
compute_client.servers.get,
server.id,
+ success_status=['active', 'verify_resize'],
callback=_show_progress,
):
sys.stdout.write(_('Complete\n'))