Fibre Channel Ports speed calculation in GFC is not correct


Description

Fibre channel port speed calculation in GFC is not correct.

For Hitachi devices, sample speed returned:2125000000, 4250000000. The expected port speed is 2 GFC, 4 GFC. The actual port speed is 2.125 GFC, 4.250 GFC.

For EMC devices, sample speed returned is 9148280344. The expected port speed is 8GFC. The actual port speed is 9.148 GFC.

Steps to Reproduce

1. Run discovery to storage server.

2. Confirm storage server is created.

3. Check the Fibre Channel Ports tab, the Speed is non-standard, for example, 2.125 GFC, 9.148 GFC.



Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

If an upgrade is not possible, you can use the below workaround. Note once an out of box script is changed it will be skipped during the official platform upgrade, then you can either manually revert it to OOB after the upgrade, or force it to be overwritten during the upgrade.

Modify the Script Include DiscoveryDataRate updating the below function:

DiscoveryDataRate.toGFC = function(rate, unit) {

if (!rate)
return 'Unknown';

//above are OOB, below is the workaround

GFCRateRange = [1062500000,2125000000,4250000000,8500000000,10518750000,14025000000,21037500000,28500000000];
if (GFCRateRange.indexOf(rate) != -1)
unit = 'GFC';

EMCRate = rate / 1143535043;
EMCRateRange = [1,2,4,8,10,16,32,64,128,256];
if (EMCRateRange.indexOf(EMCRate) != -1)
return EMCRate;

//workaround complete, below are OOB

// The lazy man's way to round to 3 digits:
// Get the rate (as a string) rounded to 3 digits
rate = (getBps(rate, unit) / units.G).toFixed(3);


Related Problem: PRB1373569