wanghao, I think the problem with ignoring the success of cinder's terminate_connection was pointed out by Walt_Boring:
" If Nova only calls libvirt volume's disconnect_volume, without Cinder's terminate_connection being called, then volumes may show back up on the nova host. Specifically for iSCSI volumes.
If an iSCSI session from the compute host to the storage backend still exists (because other volumes are connected), then the volume you just removed will show back up on the next scsi bus rescan."
So, the user should not think that the detach succeeded until the terminate_connection succeeds. Since terminate_connection is asynchronous, the Nova volume-detach will have to verify this somehow.
wanghao, I think the problem with ignoring the success of cinder's terminate_ connection was pointed out by Walt_Boring:
" If Nova only calls libvirt volume's disconnect_volume, without Cinder's terminate_ connection being called, then volumes may show back up on the nova host. Specifically for iSCSI volumes.
If an iSCSI session from the compute host to the storage backend still exists (because other volumes are connected), then the volume you just removed will show back up on the next scsi bus rescan."
So, the user should not think that the detach succeeded until the terminate_ connection succeeds. Since terminate_ connection is asynchronous, the Nova volume-detach will have to verify this somehow.