From de9a6fc0700d821f9fca6bf347407eccd87f0064 Mon Sep 17 00:00:00 2001
From: Julie Pichon <jpichon@redhat.com>
Date: Wed, 9 May 2018 17:43:09 +0100
Subject: [PATCH] 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: 19621
---
 openstackclient/compute/v2/server.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index 5daefc0cd6..c80b5a3c25 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -1386,6 +1386,7 @@ class MigrateServer(command.Command):
             if utils.wait_for_status(
                 compute_client.servers.get,
                 server.id,
+                success_status=['active', 'verify_resize'],
                 callback=_show_progress,
             ):
                 self.app.stdout.write(_('Complete\n'))