image snapshot creation fails

Bug #856721 reported by Dan Prince
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Dan Prince
Diablo
Fix Released
Undecided
Unassigned

Bug Description

Using lp:nova bzr 1617.

I'm unable to create image snapshots. I get the following exception:

2011-09-22 15:09:22,322 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/rpc/impl_kombu.py", line 620, in _process_data
(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/exception.py", line 98, in wrapped
(nova.rpc): TRACE: return f(*args, **kw)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 687, in snapshot_instance
(nova.rpc): TRACE: self.driver.snapshot(context, instance_ref, image_id)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi_conn.py", line 209, in snapshot
(nova.rpc): TRACE: self._vmops.snapshot(context, instance, image_id)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 557, in snapshot
(nova.rpc): TRACE: self._session, instance, template_vdi_uuids, image_id)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vm_utils.py", line 400, in upload_image
(nova.rpc): TRACE: session.wait_for_task(task, instance.id)
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi_conn.py", line 455, in wait_for_task
(nova.rpc): TRACE: return done.wait()
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/eventlet/event.py", line 116, in wait
(nova.rpc): TRACE: return hubs.get_hub().switch()
(nova.rpc): TRACE: File "/usr/lib/python2.6/dist-packages/eventlet/hubs/hub.py", line 177, in switch
(nova.rpc): TRACE: return self.greenlet.switch()
(nova.rpc): TRACE: Failure: ['XENAPI_PLUGIN_EXCEPTION', 'upload_vhd', 'ResponseNotReady', '']
(nova.rpc): TRACE:

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → High
Revision history for this message
Dan Prince (dan-prince) wrote :

The issue here is that snapshots fail when I'm not using keystone. Thus auth token is None and the headers weren't getting sent. This fixes it:

--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -259,8 +259,8 @@ def _upload_tarball(staging_path, image_id, glance_host, gla
     conn.putrequest('HEAD', '/v1/images/%s' % image_id)
     if auth_token:
         conn.putheader('x-auth-token', auth_token)
- conn.endheaders()

+ conn.endheaders()

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/nova

Reviewed: https://review.openstack.org/660
Committed: http://github.com/openstack/nova/commit/14eb9c6ec9c82c9f56cde5279aebb1e5a8fac4f4
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 14eb9c6ec9c82c9f56cde5279aebb1e5a8fac4f4
Author: Dan Prince <email address hidden>
Date: Mon Sep 26 13:39:14 2011 -0400

    Call endheaders when auth_token is None. Fixes bug 856721.

    Change-Id: I2be932d3c532a7be03a0e5296e592e681c05b75d

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Reviewed: https://review.openstack.org/936
Committed: http://github.com/openstack/nova/commit/2754749c3767b7ddd90957b528828e235e25ccab
Submitter: Jenkins
Branch: stable/diablo

 status fixcommitted
 done

commit 2754749c3767b7ddd90957b528828e235e25ccab
Author: Dan Prince <email address hidden>
Date: Mon Sep 26 13:39:14 2011 -0400

    Call endheaders when auth_token is None. Fixes bug 856721.

    (cherry picked from commit 14eb9c6ec9c82c9f56cde5279aebb1e5a8fac4f4)

    Change-Id: I39965c311d8485a87e27e83605ee52c6b1386c71

Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted nova into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 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.