]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix up failover_host exceptions to preserve states
authorAlex O'Rourke <alex.orourke@hpe.com>
Thu, 10 Mar 2016 21:33:20 +0000 (13:33 -0800)
committerAlex O'Rourke <alex.orourke@hpe.com>
Thu, 10 Mar 2016 22:48:34 +0000 (14:48 -0800)
commit2dbd05452c4be3ea13f04571a8f821d228449197
tree9338563f350fb13af0ddbab3d066926d367b41b1
parentb31088f0a6a566eaca2e9cba9c4ecc4a4a974692
Fix up failover_host exceptions to preserve states

UnableToFailOver and InvalidReplicationTarget do not save the state
of replication_status currently. This patch adds host.save() in
order to write the change to the db.

In addition, the manager should honor the current replication state
of the host when InvalidReplicationTarget is raised instead of forcing
it into 'enabled' state.

Change-Id: I01af6d70539e518936c74e425c3fad60f4b94581
cinder/volume/manager.py