This is basically the same problem found in:
https://bugs.launchpad.net/cinder/+bug/1573126
which was for forced backup, but it also exists for backup of a snapshot.
Some drivers (HPE, emc, dell, ...) return a model update after create_volume_from_snapshot which has an updated provider_location, but this return value is ignored in cinder/volume/driver.py and thus not updated in the DB.
Subsequently, the export cannot be found and we see the following failure and stacktrace:
2016-06-07 11:42:20.567 11056 ERROR cinder.volume.driver [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] ISCSI discovery attempt failed for:ha-volume-manager
2016-06-07 11:42:20.567 11056 DEBUG cinder.volume.driver [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] Error from iscsiadm -m discovery: iscsiadm: Cannot resolve host ha-volume-manager. getaddrinfo error: [Name or service not known]
iscsiadm: cannot resolve host name ha-volume-manager
iscsiadm: cannot resolve host name ha-volume-manager
iscsiadm: Could not perform SendTargets discovery: encountered connection failure
_do_iscsi_discovery /opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/cinder/volume/driver.py:2348
2016-06-07 11:42:20.570 11056 INFO requests.packages.urllib3.connectionpool [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] Starting new HTTPS connection (1): 192.168.41.3
2016-06-07 11:42:20.579 11056 WARNING py.warnings [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] /opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
2016-06-07 11:42:20.582 11056 DEBUG requests.packages.urllib3.connectionpool [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] "DELETE /lhos/credentials/b82ccbf7-b3c8-4321-9971-29e3cc891427 HTTP/1.1" 200 0 _make_request /opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:387
2016-06-07 11:42:20.583 11056 ERROR cinder.volume.manager [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] Driver initialize connection failed (error: Invalid volume: Could not find iSCSI export for volume volume-04fafc0f-8691-4e38-af8a-7b53c18c2351).
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] Exception during message handling: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Invalid volume: Could not find iSCSI export for volume volume-04fafc0f-8691-4e38-af8a-7b53c18c2351).
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher incoming.message))
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 185, in _dispatch
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/cinder/volume/manager.py", line 1473, in initialize_connection
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher raise exception.VolumeBackendAPIException(data=err_msg)
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Invalid volume: Could not find iSCSI export for volume volume-04fafc0f-8691-4e38-af8a-7b53c18c2351).
2016-06-07 11:42:20.585 11056 ERROR oslo_messaging.rpc.dispatcher
2016-06-07 11:42:20.589 11056 ERROR oslo_messaging._drivers.common [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] Returning exception Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Invalid volume: Could not find iSCSI export for volume volume-04fafc0f-8691-4e38-af8a-7b53c18c2351). to caller
2016-06-07 11:42:20.590 11056 ERROR oslo_messaging._drivers.common [req-e75285a1-5581-434f-ba36-f7361bb3baaf 0ee3417d7f714de7a01f50a30a764245 490e121a3a224535a53257b58ec09179 - - -] ['Traceback (most recent call last):\n', ' File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply\n incoming.message))\n', ' File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 185, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/opt/stack/venv/cinder-20160531T211724Z/lib/python2.7/site-packages/cinder/volume/manager.py", line 1473, in initialize_connection\n raise exception.VolumeBackendAPIException(data=err_msg)\n', 'VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Invalid volume: Could not find iSCSI export for volume volume-04fafc0f-8691-4e38-af8a-7b53c18c2351).\n']
Fix proposed to branch: master /review. openstack. org/327375
Review: https:/