When I tried to migrate volume between two back-ends using LIO scsi target, it was failed due to the error of "Unable to terminate volume connection: 'NoneType' object has no attribute 'split'.
Using tgt scsi target, this problem doesn't happen because tgt does not have terminate_connection.
In my understanding, volume migration using LIO target is used to work fine, but recent commit (I'm not sure which one) breaks this unfortunately.
Test summary.
---------------------------------------------------------------------------------------------------------------------------
$ cinder service-list
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | host1 | nova | enabled | up | 2015-03-17T22:02:04.000000 | None |
| cinder-volume | host2@lvmdriver-2 | nova | enabled | up | 2015-03-17T22:02:10.000000 | None |
| cinder-volume | host1@lvmdriver-1 | nova | enabled | up | 2015-03-17T22:02:03.000000 | None |
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
$ cinder extra-specs-list
+--------------------------------------+-------------+------------------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+-------------+------------------------------------------+
| 1b787af4-31fd-4bd1-8765-a30faaca66f8 | lvmdriver-1 | {u'volume_backend_name': u'lvmdriver-1'} |
+--------------------------------------+-------------+------------------------------------------+
c-vol on host1
---------------------
[lvmdriver-1]
iscsi_helper = lioadm
volume_group = abcde
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = lvmdriver-1
c-vol on host2
---------------------
[lvmdriver-2]
iscsi_helper = lioadm
volume_group = fghij
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = lvmdriver-1
migration command
$ cinder migrate vol2 host2@lvmdriver-2#lvmdriver-1
---------------------------------------------------------------------------------------------------------------------------
c-vol error log
----------------------
2015-03-17 16:11:00.210 ERROR cinder.volume.driver [-] Unable to terminate volume connection: 'NoneType' object has no attribute 'split'
2015-03-17 16:11:00.210 ERROR cinder.volume.manager [-] Failed to copy volume db5a6c34-e271-4d1b-a768-07995ca86f82 to 89a74435-e7ac-4d19-85b5-1298512bc1ae
2015-03-17 16:11:00.230 DEBUG oslo_messaging._drivers.amqp [-] UNIQUE_ID is 3ad6ddb8d55643fe8c3042e83f33fa29. from (pid=4863) _add_unique_id /usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqp.py:224
2015-03-17 16:11:00.256 INFO cinder.volume.targets.lio [-] Creating iscsi_target for volume: volume-db5a6c34-e271-4d1b-a768-07995ca86f82
2015-03-17 16:11:00.257 DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/stack-vg1/volume-db5a6c34-e271-4d1b-a768-07995ca86f82 iqn.2010-10.org.openstack:volume-db5a6c34-e271-4d1b-a768-07995ca86f82 Tg88KXQTjHoG3hJc5vJe 4ihLxkC3AZqZnvQ7 False from (pid=4863) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:191
2015-03-17 16:11:00.461 DEBUG oslo_concurrency.processutils [-] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/stack-vg1/volume-db5a6c34-e271-4d1b-a768-07995ca86f82 iqn.2010-10.org.openstack:volume-db5a6c34-e271-4d1b-a768-07995ca86f82 Tg88KXQTjHoG3hJc5vJe 4ihLxkC3AZqZnvQ7 False" returned: 0 in 0.204s from (pid=4863) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:216
2015-03-17 16:11:00.461 DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool get-targets from (pid=4863) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:191
2015-03-17 16:11:00.691 DEBUG oslo_concurrency.processutils [-] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool get-targets" returned: 0 in 0.230s from (pid=4863) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:216
2015-03-17 16:11:00.692 DEBUG cinder.volume.targets.iscsi [-] Set provider_location to: 192.168.100.50:3260,iqn.2010-10.org.openstack:volume-db5a6c34-e271-4d1b-a768-07995ca86f82 iqn.2010-10.org.openstack:volume-db5a6c34-e271-4d1b-a768-07995ca86f82 0 from (pid=4863) create_export /opt/stack/cinder/cinder/volume/targets/iscsi.py:205
2015-03-17 16:11:00.728 ERROR oslo_messaging.rpc.dispatcher [-] Exception during message handling: Bad or unexpected response from the storage volume backend API: Unable to terminate volume connection: 'NoneType' object has no attribute 'split'
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 1398, in migrate_volume
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher self.db.volume_update(ctxt, volume_ref['id'], updates)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 82, in __exit__
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 1383, in migrate_volume
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher new_type_id)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 1248, in _migrate_volume_generic
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher {'vol': new_volume['id']})
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 82, in __exit__
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 1205, in _migrate_volume_generic
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher remote='dest')
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/driver.py", line 540, in copy_volume_data
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher remote=src_remote)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/driver.py", line 354, in _detach_volume
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher raise exception.VolumeBackendAPIException(data=err_msg)
2015-03-17 16:11:00.728 TRACE oslo_messaging.rpc.dispatcher VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Unable to terminate volume connection: 'NoneType' object has no attribute 'split'
full c-vol log
http://paste.openstack.org/show/192986/
Adding Vincent Hou as an interested party.