From 7180f1623259880437e81b8a2d56663cb6cb61e4 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 13 Jan 2019 01:16:37 -0800 Subject: [PATCH] Enhance exception raised when invalid power state The invalid state exception did not pass wht power state as a string. Ensure that it is a string and not an integer. TrivialFix Change-Id: I37bb05585bc16de14f7e9a2eb3864c5ed90c7603 Closes-bug: #1811565 --- nova/conductor/tasks/live_migrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/conductor/tasks/live_migrate.py b/nova/conductor/tasks/live_migrate.py index 9ee86c08bec1..0ba59add7ead 100644 --- a/nova/conductor/tasks/live_migrate.py +++ b/nova/conductor/tasks/live_migrate.py @@ -149,7 +149,7 @@ class LiveMigrationTask(base.TaskBase): raise exception.InstanceInvalidState( instance_uuid=self.instance.uuid, attr='power_state', - state=self.instance.power_state, + state=power_state.STATE_MAP[self.instance.power_state], method='live migrate') def _check_instance_has_no_numa(self):