RemoteFS based drivers do not honor clone volume size

Bug #1554760 reported by Sean McGinnis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Triaged
Medium
Unassigned

Bug Description

It's possible to create a volume from a source volume with a different size. The create_cloned_volume call into the driver could have a larger volume['size'] than the source volume. So the driver will need to create the clone, then check if it needs to extend the volume to a new size.

Changed in cinder:
milestone: none → newton-2
Ji.Wei (jiwei)
Changed in cinder:
assignee: nobody → Ji.Wei (jiwei)
Revision history for this message
Ji.Wei (jiwei) wrote :

In remotefs drive, the code flow of create a clone volume is

1、Create a snapshot of the source volume

2、Call function: copy_volume_from_snapshot
     self._copy_volume_from_snapshot(temp_snapshot,
                                            volume_info,
                                            volume['size'])

This function was introduced to the specified volume['size']

3、Delete temporary snapshot

From the code flow, it seems, do not need to check if it needs to extend the volume to a new size

However, the copy_volume_from_snapshot is not implemented in the drive

    def _copy_volume_from_snapshot(self, snapshot, volume, volume_size):
        raise NotImplementedError()

This causes the create_volume_from_snapshot create_cloned_volume function to be unable to use.

Perhaps, this requires a new BP to achieve this function?

Changed in cinder:
assignee: Ji.Wei (jiwei) → Erlon R. Cruz (sombrafam)
status: New → In Progress
Changed in cinder:
milestone: newton-2 → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/336092
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in cinder:
milestone: ocata-1 → ongoing
Changed in cinder:
assignee: Erlon R. Cruz (sombrafam) → Xinli Guan (xinli-v)
Revision history for this message
Lucian Petrut (petrutlucian94) wrote :

For the record, this doesn't affect the SMBFS driver. We're resizing the image in the '_copy_volume_from_snapshot' method: https://github.com/openstack/cinder/blob/5d5349505419016d079935331a87e915d9962fd0/cinder/volume/drivers/windows/smbfs.py#L659-L660

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Jay Bryant (<email address hidden>) on branch: master
Review: https://review.openstack.org/336092
Reason: It was decided that we wouldn't go down this path so we this patch can be abandoned.

Revision history for this message
Jay Bryant (jsbryant) wrote :

Moving to triaged. This actually still needs to be fixed since the associated patch was abandoned.

Changed in cinder:
status: In Progress → Triaged
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: Xinli Guan (xinli-v) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.