CiscoFCSanLookupService.get_device_mapping_from_network method should not use zoning_vsan as the key of the device mapping dictionary

Bug #1438919 reported by Ning Liao
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

In Cisco fc san lookup service implementation, source code from master branch below:

https://github.com/openstack/cinder/blob/master/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py

In CiscoFCSanLookupService class, its get_device_mapping_from_network method should not use zoning_vsan as the key of the returned device mapping dictionary.

Because this method looks up through all the san fabrics defined in Cinder configuration, and users may define multiple san fabrics
in the configuration, e.g., multiple principle switch IP addresses, so Cinder can manage multiple san fabrics, and for each principle switch, the zoning vsan can be the same. For example, users can define a vsan id 15 in switch 1 as well as switch 2. Let's assume WWN1 is in vsan 15 of switch 1, and WWN2 in vsan 15 of switch 2. Then the CiscoFCSanLookupService.get_device_mapping_from_network method(['WWN1', 'WWN2'], ['WWNx',...]), then this method will most likely return something like this (assuming vsan 15 of switch 1 is iterated first than vsan 15 of switch 2)
{
'15': {
'initiator_port_wwn_list': ('WWN2', '...')
 'target_port_wwn_list': ('WWNx', ..)
}
}

This is wrong. Instead, we should use fabric_name as the key, just as Brocade lookup service does.

Angela Smith (aallen-m)
tags: added: cisco
Al Lau (alau2)
Changed in cinder:
assignee: nobody → Al Lau (alau2)
Revision history for this message
Al Lau (alau2) wrote :

As described in the submitter's comment, I will make the change.

Mike Perez (thingee)
tags: added: zone-manager
Revision history for this message
Al Lau (alau2) wrote :

Form the submitter's description of the bug, I think this change would suffice.

$ git diff
diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py b/c
index 8db7743..20ef158 100644
--- a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py
+++ b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py
@@ -130,9 +130,9 @@ class CiscoFCSanLookupService(fc_service.FCSanLookupService)
                 # logged in
                 nsinfo = ''
                 LOG.debug("show fcns database for vsan %s", zoning_vsan)
- nsinfo = self.get_nameserver_info(zoning_vsan)
+ nsinfo = self.get_nameserver_info()

- LOG.debug("Lookup service:fcnsdatabase-%s", nsinfo)
+ LOG.debug("Lookup service:nsinfo-%s", nsinfo)
                 LOG.debug("Lookup service:initiator list from caller-%s",
                           formatted_initiator_list)
                 LOG.debug("Lookup service:target list from caller-%s",

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Owner Expired

Unassigning due to no activity.

Changed in cinder:
assignee: Al Lau (alau2) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.