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 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, August 20, 2013 11:31 AM
To: openstack 
<[email protected]<mailto:[email protected]>>
Subject: [Openstack] [cinder] CreateVolumeFromSpecTask._create_from_image

Hello,

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
            # 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')
            try:
                volume_ref = self.db.volume_update(context,
                                                   volume_ref['id'], updates)
            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, 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.

Thanks,
Victor Rodionov
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to