Rescue with bad image makes instance stuck in weird state

Bug #1571825 reported by Ivo Vasev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ivo Vasev
Mitaka
Fix Released
Medium
Matt Riedemann

Bug Description

When badly formatted image id is used, this cause nova to proces the request and the VM goes in error/shutoff state.

User behavior should be improved.

https://review.openstack.org/#/c/307317/

Ivo Vasev (ivo-vasev)
Changed in nova:
assignee: nobody → Ivo Vasev (ivo-vasev)
Changed in nova:
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

Ivo, can you provide the error you see? Logs?

Also, what version are you testing against?

tags: added: api images
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
tags: added: mitaka-backport-potential
Revision history for this message
Ivo Vasev (ivo-vasev) wrote :

------------
REQUEST SENT
------------
request method..: POST
request url.....: https://endpoint:8774/v2.1/tenant/servers/9eb54ea2-a3bc-4a57-8557-4696769a7975/action
request params..:
request headers.: {'Content-Length': '39', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'X-Auth-Token': u'token', 'Connection': 'keep-alive', 'User-Agent': 'python-requests/2.9.1', 'Content-Type': 'application/json'}
request body....: {"rescue": {"rescue_image_ref": "1"}}

2016-04-19 13:26:34,998: DEBUG: cafe.engine.http.client:
-----------------
RESPONSE RECEIVED
-----------------
response status..: <Response [200]>
response time....: 0.972425937653
response headers.: {'Date': 'Tue, 19 Apr 2016 18:26:34 GMT', 'X-Compute-Request-Id': 'req-87cd4975-4e0d-47e4-aac2-54b2d7bec470', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '29'}
response body....: {"adminPass": "pass"}
------------
REQUEST SENT
------------
request method..: GET
request url.....: https://endpoint:8774/v2.1/tenant/servers/9eb54ea2-a3bc-4a57-8557-4696769a7975
request params..:
request headers.: {'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'X-Auth-Token': u'token', 'Connection': 'keep-alive', 'User-Agent': 'python-requests/2.9.1', 'Content-Type': 'application/json'}
request body....: None

2016-04-19 13:26:50,903: DEBUG: cafe.engine.http.client:
-----------------
RESPONSE RECEIVED
-----------------
response status..: <Response [200]>
response time....: 0.893929958344
response headers.: {'Date': 'Tue, 19 Apr 2016 18:26:50 GMT', 'X-Compute-Request-Id': 'req-51f105c3-c58f-426a-b888-0e880904fdec', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '1926'}
response body....: {"server": {"status": "ACTIVE"
------------
REQUEST SENT
------------
request method..: GET
request url.....: https://endpoint:8774/v2.1/tenant/servers/9eb54ea2-a3bc-4a57-8557-4696769a7975
request params..:
request headers.: {'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'X-Auth-Token': u'token', 'Connection': 'keep-alive', 'User-Agent': 'python-requests/2.9.1', 'Content-Type': 'application/json'}
request body....: None

2016-04-19 13:27:06,843: DEBUG: cafe.engine.http.client:
-----------------
RESPONSE RECEIVED
-----------------
response status..: <Response [200]>
response time....: 0.926450967789
response headers.: {'Date': 'Tue, 19 Apr 2016 18:27:06 GMT', 'X-Compute-Request-Id': 'req-fc73ec49-6866-49da-85e2-09e4294b30de', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '1913'}
response body....: {"server": {"status": "SHUTOFF"

Revision history for this message
Ivo Vasev (ivo-vasev) wrote :

When tried to revert the state using general admin ops behavior for resolution, state can be reverted to ACTIVE, but ssh fails after that

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/307317
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=988668e04abfa1e2a3101a5a87c247445a311e5b
Submitter: Jenkins
Branch: master

commit 988668e04abfa1e2a3101a5a87c247445a311e5b
Author: Ivo Vasev <email address hidden>
Date: Mon Apr 18 10:10:49 2016 -0500

    Added validation for rescue image ref

    Make sure we do not enter error/shutoff state when using invalid image
    Added tests with full href url
    Fixed tox pep8 ordering

    Closes-Bug: #1571825
    Change-Id: I181cb54f14200c27362de5cd5777df05fe87db6f

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/309637

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/nova 14.0.0.0b1

This issue was fixed in the openstack/nova 14.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/mitaka)

Reviewed: https://review.openstack.org/309637
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=59716f2347305759025978f6d79cc19f9af7a884
Submitter: Jenkins
Branch: stable/mitaka

commit 59716f2347305759025978f6d79cc19f9af7a884
Author: Ivo Vasev <email address hidden>
Date: Mon Apr 18 10:10:49 2016 -0500

    Added validation for rescue image ref

    Make sure we do not enter error/shutoff state when using invalid image
    Added tests with full href url
    Fixed tox pep8 ordering

    Closes-Bug: #1571825
    Change-Id: I181cb54f14200c27362de5cd5777df05fe87db6f
    (cherry picked from commit 988668e04abfa1e2a3101a5a87c247445a311e5b)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 13.1.0

This issue was fixed in the openstack/nova 13.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.