From e8c223f1f9041a2204138ea587a25728c4dba6fd Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 25 May 2018 13:47:52 +0800 Subject: [PATCH] [Unity] Return logged-out initiators In current implementation, Unity driver doesn't return the targets which connect to the logged-out initiators, which causes the zone manager fails to clean up the FC zone. The fix returns all the targets of specified initiators no matter they are logged in or not. Change-Id: I1438d0bd4a43e1813dfb0a6e9b3c4a177c2fee8f Closes-bug: #1773305 (cherry picked from commit 1ef06d4a31c3010f170da20fcc823dd81e77c1a7) --- cinder/volume/drivers/dell_emc/unity/adapter.py | 2 +- cinder/volume/drivers/dell_emc/unity/driver.py | 4 +++- ...unity-return-logged-out-initiator-6ab1f96f21bb284c.yaml | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/unity-return-logged-out-initiator-6ab1f96f21bb284c.yaml diff --git a/cinder/volume/drivers/dell_emc/unity/adapter.py b/cinder/volume/drivers/dell_emc/unity/adapter.py index 45ed0fef6bf..90b6d73ec2e 100644 --- a/cinder/volume/drivers/dell_emc/unity/adapter.py +++ b/cinder/volume/drivers/dell_emc/unity/adapter.py @@ -795,7 +795,7 @@ class FCAdapter(CommonAdapter): def filter_targets_by_host(self, host): if self.auto_zone_enabled and not host.host_luns: return self.client.get_fc_target_info( - host=host, logged_in_only=True, + host=host, logged_in_only=False, allowed_ports=self.allowed_ports) return [] diff --git a/cinder/volume/drivers/dell_emc/unity/driver.py b/cinder/volume/drivers/dell_emc/unity/driver.py index 751c6310324..24001bc7049 100644 --- a/cinder/volume/drivers/dell_emc/unity/driver.py +++ b/cinder/volume/drivers/dell_emc/unity/driver.py @@ -67,9 +67,11 @@ class UnityDriver(driver.ManageableVD, 3.1.4 - Fixes bug 1775518 to make sure driver succeed to initialize even though the value of unity_io_ports and unity_storage_pool_names are empty + 3.1.5 - Cherry-pick the fix for 1773305 to return the targets which + connect to the logged-out initiators """ - VERSION = '03.01.04' + VERSION = '03.01.05' VENDOR = 'Dell EMC' # ThirdPartySystems wiki page CI_WIKI_NAME = "EMC_UNITY_CI" diff --git a/releasenotes/notes/unity-return-logged-out-initiator-6ab1f96f21bb284c.yaml b/releasenotes/notes/unity-return-logged-out-initiator-6ab1f96f21bb284c.yaml new file mode 100644 index 00000000000..63615261580 --- /dev/null +++ b/releasenotes/notes/unity-return-logged-out-initiator-6ab1f96f21bb284c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Dell EMC Unity Driver: Fixes `bug 1773305 + `__ + to return the targets which connect to the logged-out initiators. Then the + zone manager could clean up the FC zone based on the correct target wwns.