[Openstack] [cinder] CreateVolumeFromSpecTask._create_from_image
harlowja at yahoo-inc.com
Wed Aug 21 22:37:19 UTC 2013
Is there anyway for the volume driver to have some kind of mechanism to say 'export volume before' instead of 'after'??
That would be one way to handle this.
From: Victor Rodionov <victor.rodionov at nexenta.com<mailto:victor.rodionov at nexenta.com>>
Date: Tuesday, August 20, 2013 11:31 AM
To: openstack <openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>>
Subject: [Openstack] [cinder] CreateVolumeFromSpecTask._create_from_image
It seems there is an error in CreateVolumeFromSpecTask for create volume from image (_create_from_image method)
if not cloned:
# TODO(harlowja): what needs to be rolled back in the clone if this
# volume create fails?? Likely this should be a subflow or broken
# out task in the future. That will bring up the question of how
# do we make said subflow/task which is only triggered in the
# clone image 'path' resumable and revertable in the correct
# Create the volume and then download the image onto the volume.
model_update = self.driver.create_volume(volume_ref)
updates = dict(model_update or dict(), status='downloading')
volume_ref = self.db.volume_update(context,
LOG.exception(_("Failed updating volume %(volume_id)s with "
image_id, image_location, image_service)
make_bootable = True
As you can see after volume created this task call driver _copy_image_to_volume method, problem it that for some ISCSI drivers this operation may require volume export before copy image to volume.
One of solution can be create export after volume created and then remove export when image copied.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openstack