The terminate_connection() processing contains this flow in driver:
_unmap_lun() -->_remove_members() -->remove_and_reset_members() -->get_associated_masking_group_from_device()
However, this fails to take into account the particular masking view that is associated with the volume's connection. In the PowerVC live migration use case, a volume can be mapped to source and target VMs (NPIV) or hosts for a window of time, and if so, get_associated_masking_group_from_device() can look up the wrong masking storage group since the view is not passed in. It likely should be passed down from its initial lookup in find_device_number(), and that method's lookup of the view needs to take into account the initiator wwpns per https://bugs.launchpad.net/cinder/+bug/1382641
Fix proposed to branch: master /review. openstack. org/140909
Review: https:/