Fix handling multiple WWPNs on preferred FC node
There was a bug in the code that checked to see if the
appropriate WWPN for a preferred node was available on the storage
host in intialize_connection. It was assumed that there would only
ever be one preferred WWPN. The code just checked to see if the list of
preferred WWPNs was in the list of available WWPNs. This would only work
if all of the WWPNs were available on the storage host. This resulted in
volumes not being able to be mounted when they should have been
available.
This fix changes the check of the preferred WWPNs to check each
item in the list until one is found. The first one found is used
as the target WWPN. If no match is found, the old default behavior
of selecting the first available WWPN is used. I have added a
warning message for this case as it is quite possible that this
won't work in the user's environment as was the case that uncovered
this bug.
Note that this change is only relevant for systems that are not using
multipath as systems that use multipath don't choose one WWPN, they
just send the whole available list back.
Change-Id: I8d3239da24a8f9fbd8309ba5c90b05b29a068754
Close-bug:
1308298