Multi backend attepts to read a deleted domain
This effectively results in all delete-domain requests failing when the multi backend is used. Closes-Bug: 1375397 Change-Id: I05a54600bf7493ff467b8f5a81af7d682fe5ca7a
This commit is contained in:
parent
df4284aebc
commit
4de363a5ee
|
@ -106,10 +106,13 @@ class MultiBackend(base.Backend):
|
|||
self.master.update_domain(context, domain)
|
||||
|
||||
def delete_domain(self, context, domain):
|
||||
# Get the "full" domain (including id) from Central first, as we may
|
||||
# Fetch the full domain from Central first, as we may
|
||||
# have to recreate it on slave if delete on master fails
|
||||
deleted_context = context.deepcopy()
|
||||
deleted_context.show_deleted = True
|
||||
|
||||
full_domain = self.central.find_domain(
|
||||
context, {'name': domain['name']})
|
||||
deleted_context, {'id': domain['id']})
|
||||
|
||||
self.slave.delete_domain(context, domain)
|
||||
try:
|
||||
|
|
|
@ -103,6 +103,7 @@ class MultiBackendTestCase(tests.TestCase, BackendTestMixin):
|
|||
def test_delete_domain(self):
|
||||
context = self.get_context()
|
||||
domain = self.get_domain_fixture()
|
||||
domain['id'] = 'a8aeb2ee-40da-476b-a9d8-26bf0c0065f6'
|
||||
|
||||
# Since multi's delete fetches the domain from central to be able to
|
||||
# recreate it if something goes wrong, create the domain first
|
||||
|
|
Loading…
Reference in New Issue