Extending a volume fail after snapshoting the vm when volume driver is vmware.vmdk.VMwareVcVmdkDriver

Bug #1712332 reported by wind
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

I use vmware.vmdk.VMwareVcVmdkDriver as volume driver, when I try to extend a volume, I fail and the
volume stataus is "error_extending".

The /var/log/cinder/volume.log shows:
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager [req-8607343c-e3b8-4189-92de-54b8f6654593 4a3a8e237cc3402191178c26a9d3f8e3 e66d6cffd8b9448aacd33fbf755776e7 - - -] Extend volume failed.
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager Traceback (most recent call last):
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1992, in extend_volume
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager self.driver.extend_volume(volume, new_size)
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager return f(*args, **kwargs)
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/vmware/vmdk.py", line 1576, in extend_volume
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager (host, rp, folder, summary) = self._select_ds_for_volume(new_size)
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/vmware/vmdk.py", line 536, in _select_ds_for_volume
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager req[hub.DatastoreSelector.SIZE_BYTES] = (volume['size'] * units.Gi)
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager TypeError: 'int' object has no attribute '__getitem__'
2017-08-22 16:57:01.285 2275061 ERROR cinder.volume.manager

The steps to reproduce the bug:
1)create vm1 by "nova booot" command line
2)cinder create volume1 by "cinder create" command line
3)attach volume1 to vm1 by "nova volume-attach"
4)snapshot vm1 by "nova image-create"
5)detach volume1 from vm1 by "nova volume-detach"
6)extend volume1 by "cinder extend"

The branch of OpenStack that I use is "liberty"

I think this bug is related with the bug:
https://bugs.launchpad.net/cinder/+bug/1712329

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.