]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
LioAdm: Delete initiator from targets on terminate_connection
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Wed, 22 Oct 2014 22:30:06 +0000 (18:30 -0400)
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>
Thu, 23 Oct 2014 20:58:44 +0000 (16:58 -0400)
commit641a44eb17a8de53e54f09a2dc339129d41c529f
treedae6e8f0076cae07709f989d3c1df8b00f84f74a
parentc22038b9005070e51224f5057aac9f73cf4d0340
LioAdm: Delete initiator from targets on terminate_connection

In current LioAdm implementation, initiators are remained even if
terminate_connection is called. This keeps volumes exported to hosts
after instances attaching the volumes are live-migrated to another
host, which is not good for security. It also causes an error on the
migration back to the original host, because cinder-rtstool doesn't
update CHAP authentication if the initiator already exists.

With this patch, initiators are deleted on terminate_conection.
'initiator-delete' operation is added to cinder-rtstool.
It makes the following live-migration succeed.
Also, this adds unit tests for initialize_connection and
terminate_connection methods in LioAdm.

Change-Id: Ib273f0ba4f1ef553374c0433b049f18719f8c758
Closes-Bug: #1369541
bin/cinder-rtstool
cinder/brick/iscsi/iscsi.py
cinder/tests/test_iscsi.py
cinder/volume/driver.py