summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-02-25 01:31:02 +0000
committerRick Harris <rick.harris@rackspace.com>2011-02-25 01:31:02 +0000
commitc8345c9ebc0357f1fe06ac520f286f036cb0596c (patch)
tree197e6c852db619cf03800a77585637d8671d3d71 /plugins
parent05d135be0c0d8a90a97d62005a101345964800cf (diff)
parentc8b630a78e955756e77be8879c1da863a5357ea0 (diff)
downloadnova-c8345c9ebc0357f1fe06ac520f286f036cb0596c.tar.gz
nova-c8345c9ebc0357f1fe06ac520f286f036cb0596c.tar.xz
nova-c8345c9ebc0357f1fe06ac520f286f036cb0596c.zip
Merging trunk, small fixes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/glance7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
index 097670b58..e229a9358 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -46,6 +46,10 @@ def _copy_kernel_vdi(dest, copy_args):
logging.debug("copying kernel/ramdisk file from %s to /boot/guest/%s",
dest, vdi_uuid)
filename = KERNEL_DIR + '/' + vdi_uuid
+ #make sure KERNEL_DIR exists, otherwise create it
+ if not os.path.isdir(KERNEL_DIR):
+ logging.debug("Creating directory %s", KERNEL_DIR)
+ os.makedirs(KERNEL_DIR)
#read data from /dev/ and write into a file on /boot/guest
of = open(filename, 'wb')
f = open(dest, 'rb')
@@ -212,6 +216,7 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port):
'x-image-meta-store': 'file',
'x-image-meta-is_public': 'True',
'x-image-meta-type': 'vhd',
+ 'x-image-meta-status': 'queued',
'x-image-meta-property-kernel-id': 'nokernel',
'x-image-meta-property-ramdisk-id': 'noramdisk',
'x-image-meta-property-container-format': 'tarball',
@@ -237,7 +242,7 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port):
resp = conn.getresponse()
if resp.status != httplib.OK:
- raise Exception("Unexpected response from Glance %i" % res.status)
+ raise Exception("Unexpected response from Glance %i" % resp.status)
conn.close()