Fixes a problem in attach volume in EMC driver.
This patch fixes a problem in attach volume in EMC SMI-S driver.
The existing logic checks if a volume is already attached to any host,
but it doesn't check whether a volume is already attached to the specific
host that nova wants cinder to attach. As a result, initialize_connection
could return success (thinking it is already attached), but nova will
fail to discover the LUN later and fail the attach.
This patch adds a check to see if a volume is already attached to a
specific host. If not, it will do the attach. The reason that the
volume being attached already could be due to a nova live-migration
use case. Cinder doesn't support multiple attaches currently, but
allows a volume to be attached multiple times from nova during
live-migration.
Change-Id: I05a2f57cd8708d7fcbe902ec13665a9cfb44db07
Closes-Bug: #
1295906