get-vnc-console returns 500 if instance in invalid task_state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
李学海 |
Bug Description
Description
===========
Nova returns 500 when you create console for instance which is in transition state like deleting or migrating.
Steps to reproduce
==================
1. Instance in task_state deleting or migrating
mysql> select task_state from instances where uuid='35a5c36e-
+------------+
| task_state |
+------------+
| migrating |
+------------+
2. Try to get console
# openstack console url show --novnc 35a5c36e-
Unexpected API Error. Please report this at http://
<class 'nova.exception
Same error with "nova get-vnc-console"
Expected result
===============
Nova usually returns HTTP 409 when catches InstanceInvalid
Environment
===========
Currently seeing in Stein. But it seems nova doesn't catch this exception in other versions.
Logs & Configs
==============
2022-04-11 18:59:24,404.404 11 ERROR nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
2022-04-11 18:59:24,404.404 11 TRACE nova.api.
Changed in nova: | |
assignee: | nobody → 李学海 (lixuehai) |
Looks we miss an exception handling here.