1. There was a call to rpcapi.create_export which does not have a
matching volume manager function, causing volume migration to crash.
This call was not necessary because there is already an
initialize_connection RPC call, which calls the driver's create_export
function. Removed the create_export RPC call and function. Added better
error handling to that code in _attach_volume in driver.py as well.
2. The manager called remove_export from detach_volume, which was not
being called by these functions. I believe it makes more sense to call
it from terminate_connection. Moved it there, and fixed up the
corresponding code in _detach_volume in driver.py.
3. Remove leftovers of export code from create_volume manager flow.
Reviewed: https:/ /review. openstack. org/76471 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=b868ae707f9 ecbe254101e21d9 d7ffa0b05b17d1
Committed: https:/
Submitter: Jenkins
Branch: master
commit b868ae707f9ecbe 254101e21d9d7ff a0b05b17d1
Author: Avishay Traeger <email address hidden>
Date: Wed Feb 26 11:27:06 2014 +0200
Fix create_ export/ remove_ export in driver.py
1. There was a call to rpcapi. create_ export which does not have a connection RPC call, which calls the driver's create_export
matching volume manager function, causing volume migration to crash.
This call was not necessary because there is already an
initialize_
function. Removed the create_export RPC call and function. Added better
error handling to that code in _attach_volume in driver.py as well.
2. The manager called remove_export from detach_volume, which was not connection. Moved it there, and fixed up the
being called by these functions. I believe it makes more sense to call
it from terminate_
corresponding code in _detach_volume in driver.py.
3. Remove leftovers of export code from create_volume manager flow.
Change-Id: I2b192630ebed54 368f151db47b49c bc72601a8d7
Closes-Bug: #1285060