Runinstance : Image available status not checked

Bug #708371 reported by Tushar Patil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Tran

Bug Description

Precondition: Image status is "decrpyting" and is not available.

If I try to run the instance with an image id whose status is not available, then runinstance fails and doesn't recover.
Instead it should fail gracefully with proper error message.

Related branches

Revision history for this message
Thierry Carrez (ttx) wrote :

Could you precise a bit "runinstance fails and doesn't recover" ? What is run-instances output ? Any error showing in the Nova logs ? Which version are you running in this test ?

Changed in nova:
status: New → Incomplete
Revision history for this message
Tushar Patil (tpatil) wrote :
Download full text (4.4 KiB)

I uploaded the bundle of large size using euca-upload-bundle and registered it using euca-register and then thought of running the instance immediately since after registering the image it returned me the image id.

$euca-upload-bundle -b testbug -m /tmp/ipv6-disk-image.manifest.xml
$euca-register testbug/ipv6-disk-image.manifest.xml
IMAGE ami-6nv2ikr6

$euca-describe-images | grep ami-6nv2ikr6
IMAGE ami-6nv2ikr6 testbug/ipv6-disk-image.manifest.xml project-1 untarring private x86_64 machine ami-0fz0f67v ami-m4dqqzdq

Note: currently it is showing status as untarring

Run instance using newly registered image id.
$euca-run-instances -k test -t m1.tiny ami-6nv2ikr6

$euca-describe-instances
RESERVATION r-3vwmtvws project-1
INSTANCE i-0000008a ami-6nv2ikr6 172.16.0.11 172.16.0.11 pending test (project-1, ubuntu-compute-01) 0 m1.tiny 2011-01-27 18:27:56 nova

nova-compute.log
--------------------------
2011-01-27 10:28:15,144 INFO nova.virt.libvirt_conn [-] instance instance-0000008a: Creating image
2011-01-27 10:28:15,488 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/exception.py", line 105, in _wrap
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/libvirt_conn.py", line 414, in spawn
(nova.exception): TRACE: self._create_image(instance, xml)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/libvirt_conn.py", line 613, in _create_image
(nova.exception): TRACE: size=size)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/libvirt_conn.py", line 539, in _cache_image
(nova.exception): TRACE: fn(target=base, *args, **kwargs)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/libvirt_conn.py", line 549, in _fetch_image
(nova.exception): TRACE: images.fetch(image_id, target, user, project)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/images.py", line 51, in fetch
(nova.exception): TRACE: return f(image, path, user, project)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/virt/images.py", line 98, in _fetch_s3_image
(nova.exception): TRACE: return utils.execute(cmd_out)
(nova.exception): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 147, in execute
(nova.exception): TRACE: cmd=cmd)
(nova.exception): TRACE: ProcessExecutionError: Unexpected error while running command.
(nova.exception): TRACE: Command: /usr/bin/curl --fail --silent http://10.2.3.150:3333/_images/ami-6nv2ikr6/image -H 'Date: Thu, 27 Jan 2011 18:28:15 GMT' -H 'Authorization: AWS 60ddc94f-77b8-4c7f-a493-80239cf0744d:project-1:uqXmrCob0M611l5hu6rYo+mP/LQ=' -o /var/...

Read more...

Revision history for this message
Tushar Patil (tpatil) wrote :

I could reproduce the above problem on Revision 624.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: Incomplete → Confirmed
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
John Tran (jtran)
Changed in nova:
status: Confirmed → In Progress
John Tran (jtran)
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Brian Waldon (bcwaldon) wrote :

It is my understanding that you should leave the bug status as "In Progress" until the merge prop is actually accepted.

Revision history for this message
John Tran (jtran) wrote :

Thanks for clearing that up. Changed back to 'in progress'

Changed in nova:
status: Fix Committed → In Progress
John Tran (jtran)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
status: Fix Committed → Fix Released
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.