Image id is not checked for validity on rebuild

Bug #886701 reported by Daryl Walleck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Naveed Massjouni

Bug Description

When performing a rebuild, the image id passed in is not checked to see if it is a valid id like it is on server creation. If the image id is not valid, the instance becomes stuck in REBUILD state now with the invalid image id.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Gabe Westmaas (westmaas) wrote :

This should definitely not go to REBUILD, should go to ERROR with an explanation of the issue.

In general, I'd like to do less checking during the initial API request to keep things speedy. Thoughts?

Regardless there is a race condition so at a minimum we should go to error with an explanation.

Revision history for this message
Daryl Walleck (dwalleck) wrote :

That sounds like a reasonable solution. The only thing I would also be interested to see is if the owner of the image is also checked (user A tries to create an image using an image of user B). If only the existence of the image is checked, it might be possible to "borrow" another user's image. But that would be another bug entirely.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Gabe: can you expand on the race condition you see here?

As for the solution: ideally we would just place the instance in error if there is a failure to download the requested image from glance from glance, then add an instance fault to the db.

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

Fix proposed to branch: master
Review: https://review.openstack.org/3158

Changed in nova:
assignee: nobody → Philip Knouff (philip-knouff)
status: Confirmed → In Progress
Changed in nova:
assignee: Philip Knouff (philip-knouff) → Naveed Massjouni (ironcamel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3158
Committed: http://github.com/openstack/nova/commit/942f0404a3d7052830cdc52c17c85de7cd3bc0da
Submitter: Jenkins
Branch: master

commit 942f0404a3d7052830cdc52c17c85de7cd3bc0da
Author: Naveed Massjouni <email address hidden>
Date: Wed Jan 18 19:31:01 2012 +0000

    Validating image id for rebuild.

    bug: 886701

    Change-Id: I20ad03edca390af9203569e02ae0c1af5bb7beaf

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.