If a driver raised VolumeDriverException during failover_host then the
service would remain in "failing-over" replication status and we would
see an AttributeError exception in the logs.
That is because we were trying to set the "status" field in a service,
and that field doesn't exist.
This patch fixes this by setting the replication_status field to error
instead and by disabling 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.
Reviewed: https:/ /review. openstack. org/397359 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=4fb420c136f b853587b37b7367 6b9ecf3c9f08d7
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4fb420c136fb853 587b37b73676b9e cf3c9f08d7
Author: Gorka Eguileor <email address hidden>
Date: Mon Nov 7 12:16:01 2016 +0100
Fix status after a VolumeDriverExc eption
If a driver raised VolumeDriverExc eption during failover_host then the
service would remain in "failing-over" replication status and we would
see an AttributeError exception in the logs.
That is because we were trying to set the "status" field in a service,
and that field doesn't exist.
This patch fixes this by setting the replication_status field to error
instead and by disabling 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: #1641716 5f946f0243c841b a0b54273401
Change-Id: I374a8a187b93da