[Openstack] [cinder] CreateVolumeFromSpecTask._create_from_image

Victor Rodionov victor.rodionov at nexenta.com
Tue Aug 20 18:31:29 UTC 2013


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
            # volume create fails?? Likely this should be a subflow or
            # 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
            # manner.
            # 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,
            except exception.CinderException:
                LOG.exception(_("Failed updating volume %(volume_id)s with "
                                "%(updates)s") %
                              {'volume_id': volume_ref['id'],
                               'updates': updates})
            self._copy_image_to_volume(context, volume_ref,
                                       image_id, image_location,
            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.

Victor Rodionov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130820/8fe285e9/attachment.html>

More information about the Openstack mailing list