Env:
One Devstack with stable/ocata build which has lvm as backend.
Test steps:
1. Create a volume type "lvmdriver-1" with the only driver as backend in extra_spec.
2. Create another volume type "LUKS" with encription using below command:
cinder encryption-type-create --cipher aes-xts-plain64 --key_size 256 --control_location front-end LUKS nova.volume.encryptors.luks.LuksEncryptor
3. Both the volume type must be configured with the same volume_backend_name in extra specs.
3. Create a volume <volume1> with volume type lvmdriver-1.
4. Retype above volume from lvmdriver-1 to LUKS.
Expect result:
The retype should succeed.
Actual result:
Retype failed. Observed below traces in c-vol.log
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 222, in dispatch
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 192, in _do_dispatch
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 2396, in retype
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server new_reservations, status_update)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self.force_reraise()
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 2392, in retype
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server new_type_id=new_type_id)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 2034, in migrate_volume
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server volume.save()
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self.force_reraise()
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 2027, in migrate_volume
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self._migrate_volume_generic(ctxt, volume, host, new_type_id)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1846, in _migrate_volume_generic
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server new_volume)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self.force_reraise()
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1824, in _migrate_volume_generic
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self._copy_volume_data(ctxt, volume, new_volume, remote='dest')
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1741, in _copy_volume_data
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server {'src': src_vol['id'], 'dest': dest_vol['id']})
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server self.force_reraise()
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1736, in _copy_volume_data
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server sparse=sparse_copy_volume)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/utils.py", line 583, in copy_volume
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server sparse=sparse)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/utils.py", line 467, in _copy_volume_with_path
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server execute(*cmd, run_as_root=True)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/utils.py", line 123, in execute
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server return processutils.execute(*cmd, **kwargs)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 400, in execute
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server cmd=sanitized_cmd)
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server ProcessExecutionError: Unexpected error while running command.
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf dd if=/dev/disk/by-path/ip-10.50.128.121:3260-iscsi-iqn.2010-10.org.openstack:volume-b29bf38d-7bb7-485f-b316-8ca22f0cdd11-lun-1 of=/dev/disk/by-path/ip-10.50.128.121:3260-iscsi-iqn.2010-10.org.openstack:volume-7ff511b8-ee05-4077-9da7-ae30a864ce45-lun-1 count=1073741824 bs=1M iflag=count_bytes,direct oflag=direct
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server Exit code: 1
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server Stdout: u''
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server Stderr: u"/bin/dd: error writing '/dev/disk/by-path/ip-10.50.128.121:3260-iscsi-iqn.2010-10.org.openstack:volume-7ff511b8-ee05-4077-9da7-ae30a864ce45-lun-1': No space left on device\n1023+0 records in\n1022+0 records out\n1071644672 bytes (1.1 GB, 1022 MiB) copied, 10.0875 s, 106 MB/s\n"
2017-05-03 01:29:45.429 TRACE oslo_messaging.rpc.server
Unassigning due to no activity for > 6 months.