Handle down object servers in container-sync
If an object server is down, container-sync stops syncing the container even if the it gets object copies from "up" obejct servers. Bug 1069910 In case the git history gets mangled, this fix was done almost entirely by Donagh McCabe <donagh.mccabe@hp.com>. Change-Id: Ieeadcfeb4e880fe5f08e284d7c12492bf7a29460
This commit is contained in:
parent
1c05d62bed
commit
00c3fde8f8
@ -386,6 +386,8 @@ class ContainerSync(Daemon):
|
||||
# the others errored for some other reason.
|
||||
if not exc or exc.http_status == HTTP_NOT_FOUND:
|
||||
exc = err
|
||||
except (Exception, Timeout), err:
|
||||
exc = err
|
||||
if timestamp < looking_for_timestamp:
|
||||
if exc:
|
||||
raise exc
|
||||
|
@ -739,9 +739,10 @@ class TestContainerSync(unittest.TestCase):
|
||||
'key', FakeContainerBroker('broker'), {'account': 'a',
|
||||
'container': 'c'}))
|
||||
self.assertEquals(cs.container_puts, 2)
|
||||
self.assertEquals(len(exc), 1)
|
||||
self.assertEquals(len(exc), 3)
|
||||
self.assertEquals(str(exc[-1]), 'test exception')
|
||||
|
||||
exc = []
|
||||
def fake_direct_get_object(node, part, account, container, obj,
|
||||
resp_chunk_size=1):
|
||||
exc.append(ClientException('test client exception'))
|
||||
@ -754,7 +755,7 @@ class TestContainerSync(unittest.TestCase):
|
||||
'key', FakeContainerBroker('broker'), {'account': 'a',
|
||||
'container': 'c'}))
|
||||
self.assertEquals(cs.container_puts, 2)
|
||||
self.assertEquals(len(exc), 4)
|
||||
self.assertEquals(len(exc), 3)
|
||||
self.assertEquals(str(exc[-1]), 'test client exception')
|
||||
|
||||
def fake_direct_get_object(node, part, account, container, obj,
|
||||
|
Loading…
x
Reference in New Issue
Block a user