'Finalize failover of this backend.
When a service is clustered and replicated the failover has 2 stages,
one that does the failover of the volumes and another that finalizes
the failover of the services themselves.
This method takes care of the last part and is called from the service
doing the failover of the volumes after finished processing the
volumes.'

def failover_completed(self, context, updates):

    svc_host = vol_utils.extract_host(self.host, 'backend')
    service = objects.Service.get_by_args(context, svc_host, constants.VOLUME_BINARY)
    service.update(updates)
    try:
        self.driver.failover_completed(context, service.active_backend_id)
    except Exception:
        msg = _('Driver    reported    error    during    replication    failover    completion.')
        LOG.exception(msg)
        service.disabled = True
        service.disabled_reason = msg
        service.replication_status = fields.ReplicationStatus.ERROR
    service.save()
