From 1591c94bdd5f2b746be362dee5f0dd4068994ea4 Mon Sep 17 00:00:00 2001 From: Unmesh Gurjar Date: Fri, 31 Aug 2012 05:59:52 -0700 Subject: Fixed boot from snapshot failure. Passed the snapshot_id to cinder client from create API. Previously it was failing since snapshot was being passed instead of snapshot_id. Fixes LP: #1029211 Change-Id: I4aa1aca9067b2a282b9b46d909ef8342bf933a46 --- nova/volume/cinder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index ed6b3cd59..590b7d8a0 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -170,8 +170,12 @@ class API(base.Base): def create(self, context, size, name, description, snapshot=None, volume_type=None, metadata=None, availability_zone=None): + if snapshot is not None: + snapshot_id = snapshot['id'] + else: + snapshot_id = None item = cinderclient(context).volumes.create(size, - snapshot, + snapshot_id, name, description, volume_type, -- cgit