OSAPI reports ACTIVE when server built from bad image

Bug #814469 reported by Steve Brown
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

Nova shows instance as active when it definitely is not.

To reproduce
1. upload a bad image to glance:
glance add name="bogus" is_public="True" < barbie.jpg

2. boot it:
nova boot --flavor 1 --image <imgage id> 'bogus-server'

3. list it:
$ nova list
+-----+--------------+--------+-----------+------------+
| ID | Name | Status | Public IP | Private IP |
+-----+--------------+--------+-----------+------------+
| 667 | bogus-server | ACTIVE | | 10.0.0.7 |
+-----+--------------+--------+-----------+------------+

Brian Waldon (bcwaldon)
summary: - Nova returns incorrect status for instances
+ OSAPI reports ACTIVE when server built from bad image
Revision history for this message
Soren Hansen (soren) wrote :

Strictly speaking, we can't know if what you actually wanted executed on your virtual CPU in fact was a JPEG. Of course it won't boot and become what we usually consider a useful virtual machine, but I can't think of a sane way to determine whether it's "active". We try to boot the virtual machine and the CPU will certainly execute the "machine code" its fed, just like a "real" virtual machine would.

We can make some educated guesses (check for DHCP requests), but they're only guesses. Maybe you intentionally disabled or delayed DHCP. I can't imagine why, but who am I to judge? :)

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

I'd think it is probably up to the hypervisor to determine when something has been booted properly. We could probably just assume that if we didn't get any errors from whatever abstraction layer we talk to, it's good to go. Sound reasonable?

Brian Waldon (bcwaldon)
tags: added: osapi-v1.1
tags: removed: osapi-v1.1
Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
Brian Waldon (bcwaldon)
Changed in nova:
milestone: none → essex-4
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → none
Revision history for this message
Tom Fifield (fifieldt) wrote :

Though you can no longer upload jpgs to glance as easily (using the command given in the initial bug report because it doesn't specify a valid disk format), this bug is still valid after 3 years :)

On launch attempt of a jpg image, the scheduling, networking and image copying all works, and the state returns ACTIVE. The console reveals "No bootable device".

Revision history for this message
Joe Gordon (jogo) wrote :

looks like this is still valid. Based on Tom's comment I think we can fix this.

Changed in nova:
importance: Wishlist → Low
Revision history for this message
Sean Dague (sdague) wrote :

This really would require a guest os level API so it's a feature not a bug.

Changed in nova:
importance: Low → Wishlist
Joe Gordon (jogo)
Changed in nova:
status: Confirmed → Opinion
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.