cinder/cinder
Gorka Eguileor 7a66835d4a Fix replication_status on InvalidReplicationTarget
When we cannot do a replication failover because the driver raises an
InvalidReplicationTarget exception we revert the replication status from
"failing-over" to its previous status.

Since we are not saving the previous status we were deciding what it was
based on the requested secondary_backend_id, which is wrong, as it
assumes we cannot failover from one secondary to another secondary.

This patch fixes this by changing the deciding factor from the
secondary_backend_id to the current backend_id in the service.

We had no failover_host manager tests, and this patch doesn't try to add
all the tests that we should have, it just adds the tests pertinent for
this patch to avoid regressions and test this specific functionality.
Missing tests should be added in another patch.

Closes-Bug: #1641715
Change-Id: I5a911278aef8060e14577099b0e03daf2039a783
2016-12-05 20:10:50 +01:00
..
api Add host check on replication actions 2016-12-05 20:10:50 +01:00
backup Merge "Skip more parameters when import backup record" 2016-11-30 14:35:36 +00:00
brick Provide cfg to ignore lvm descriptor leak warnings 2016-09-26 09:20:58 +00:00
cmd Remove support for single backend config 2016-12-02 13:49:22 +01:00
common Remove empty debug_opts 2016-11-29 15:08:17 +02:00
compute Read domain info from context when contacting nova 2016-09-20 19:49:34 +00:00
config Fix config generator issue with OVO decorators 2016-11-04 11:34:34 +01:00
consistencygroup Remove 2 unnecessary assignments 2016-11-25 16:24:28 +01:00
db Merge "Replace functions 'Dict.get' and 'del' with 'Dict.pop'" 2016-12-05 12:56:44 +00:00
group Remove support for 2.x scheduler RPC API 2016-10-05 10:57:58 +02:00
hacking Merge "Hacking: Remove C305 contextlib.nested check" 2016-10-04 12:13:22 +00:00
image Merge "Fix glance v2 image update" 2016-11-27 20:48:11 +00:00
interface Add unsupported status to driver listing 2016-11-29 18:04:22 +05:30
keymgr Modifies override logic for key_manager 2016-09-21 11:01:59 -04:00
locale Imported Translations from Zanata 2016-10-15 07:34:30 +00:00
message Add pagination support to messages 2016-05-27 10:49:00 +00:00
objects Merge "Update detach_volume() with versionedobjects" 2016-12-02 10:35:44 +00:00
releasenotes/notes Removing deprecated Dell EqualLogic config options 2016-10-03 08:54:30 -07:00
scheduler Calculate virtual free capacity and notify 2016-12-02 02:00:00 +00:00
tests Fix replication_status on InvalidReplicationTarget 2016-12-05 20:10:50 +01:00
transfer check quota per_volume_gigabytes for transfer-accept 2016-09-02 03:13:25 +00:00
volume Fix replication_status on InvalidReplicationTarget 2016-12-05 20:10:50 +01:00
wsgi Remove unused logging import and LOG global var 2016-05-20 17:17:38 +08:00
zonemanager Add unsupported status to driver listing 2016-11-29 18:04:22 +05:30
__init__.py Set EVENTLET_NO_GREENDNS for IPv6 and dnspython compat 2016-11-11 13:19:07 -06:00
context.py Use to_policy_values for enforcing policy 2016-09-13 01:13:15 +00:00
coordination.py Update synchronized decorator 2016-10-12 10:25:33 -05:00
exception.py Fix UnableToFailOver exception message 2016-11-23 15:59:28 +01:00
flow_utils.py Refactoring of manager's create_volume flow 2015-07-24 11:19:09 +02:00
i18n.py Remove unused gettextutils from oslo-incubator 2015-10-16 15:22:49 -05:00
manager.py Calculate virtual free capacity and notify 2016-12-02 02:00:00 +00:00
opts.py Fix config generator issue with OVO decorators 2016-11-04 11:34:34 +01:00
policy.py Use to_policy_values for enforcing policy 2016-09-13 01:13:15 +00:00
quota.py Add generic volume groups 2016-07-16 19:34:39 -04:00
quota_utils.py Use keystoneauth1 for creating the keystone session 2016-09-22 15:28:35 +00:00
rpc.py Clean _get_cctxt method signatures 2016-11-08 16:28:14 +01:00
service.py Make c-vol use workers table for cleanup 2016-11-03 10:17:38 +01:00
ssh_utils.py Fix sshpool.remove code 2016-03-01 03:20:04 +00:00
test.py Make c-vol use workers table for cleanup 2016-11-03 10:17:38 +01:00
utils.py Add is_up property to service and cluster objects 2016-11-29 12:33:16 +02:00
version.py