hpe-storage / python-hpedockerplugin

HPE Native Docker Plugin
Apache License 2.0
36 stars 64 forks source link

Mounting volume fails on FCoE envi, due to the protocol type FC #649

Open c-raghav opened 5 years ago

c-raghav commented 5 years ago

Observation:

Mounting volume fails on FCoE environment,due to the protocol type - FCOE not being available

Setup Details:

The setup does have two arrays attached, one with FC with one of the Merlin array (15.213.71.140)and this setup was being used for google cloud POC, and using the same setup with FCoE with slight modification of hpe.conf files, where we have modified/added for FCoE setup for new array( 9K - 250) 3pardcv.log

The WWN - 1000E0071BCEDA72 is FC initiator and in zone with Merlin array (15.213.71.140), which currently not using.

Right now we are concentrating on initiator WWN - 1000f40343a6d161, which is FCoE and is in zone with 9K array 15.213.64.250

CB2506_94502N_250 cli% showport -fcoe N:S:P ENode_MAC_Address PFC_Mask 0:4:1 00-02-AC-08-12-27 0x08 0:4:2 00-02-AC-09-12-27 0x00


Zone details

MSDU_LS_E_CB2312_A:FID100:xpparaghavendra> zoneshow server_array_140 zone: server_array_140 10:00:e0:07:1b:ce:da:72; 21:31:00:02:ac:07:e2:01

Though we are able to create the volume, mount is failing over there, we can ignore the FC WWN as of now.

[root@cssosecostor-b10 ~]# ssh -l topo 15.213.64.250 topo@15.213.64.250's password: CB2506_94502N_250 cli% showhost cssosecostor-b10 Id Name Persona -WWN/iSCSI_Name- Port 46 cssosecostor-b10 Generic-ALUA 1000E0071BCEDA72 --- 1000F40343A6D161 0:4:1

2 total [root@cssosecostor-b10 ~]# systool -c fc_host -v | grep port_name port_name = "0x1000e0071bceda72" port_name = "0x1000e0071bceda73" port_name = "0x1000f40343a6d161" [root@cssosecostor-b10 ~]# systool -c fc_host -v | grep -A 5 -B 4 port_name maxframe_size = "2048 bytes" node_name = "0x2000e0071bceda72" npiv_vports_inuse = "0" port_id = "0x0b0c07" port_name = "0x1000e0071bceda72" port_state = "Online" port_type = "NPort (fabric via point-to-point)" speed = "8 Gbit" supported_classes = "Class 3" supported_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "

maxframe_size       = "2048 bytes"
node_name           = "0x2000e0071bceda73"
npiv_vports_inuse   = "0"
port_id             = "0x000000"
port_name           = "0x1000e0071bceda73"
port_state          = "Linkdown"
port_type           = "Unknown"
speed               = "unknown"
supported_classes   = "Class 3"
supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "

-- maxframe_size = "2048 bytes" node_name = "0x2000f40343a6d161" npiv_vports_inuse = "0" port_id = "0xc80002" port_name = "0x1000f40343a6d161" port_state = "Online" port_type = "NPort (fabric via point-to-point)" speed = "20 Gbit" supported_classes = "Class 3" supported_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "

wdurairaj commented 5 years ago

Right now, the FC Driver reads port of transport type FC only , that seems to the be cause after the initial analysis

https://github.com/hpe-storage/python-hpedockerplugin/blob/plugin_v2/hpedockerplugin/hpe/hpe_3par_common.py#L387

wdurairaj commented 5 years ago

Change required is

 def get_active_fc_target_ports(self):
        ports = self.get_active_target_ports()
        fc_ports = []
        for port in ports:
            if (port['protocol'] == self.client.PORT_PROTO_FC or
               port['protocol'] == self.client.PORT_PROTO_FCOE):
                fc_ports.append(port)

        return fc_ports