[tahoe-dev] [tahoe-lafs] #732: Not Enough Shares when repairing a file which has 7 shares on 2 servers
tahoe-lafs
trac at allmydata.org
Sun Jun 21 00:57:37 PDT 2009
#732: Not Enough Shares when repairing a file which has 7 shares on 2 servers
----------------------------+-----------------------------------------------
Reporter: zooko | Owner: zooko
Type: defect | Status: new
Priority: major | Milestone: 1.5.0
Component: code-encoding | Version: 1.4.1
Keywords: repair process | Launchpad_bug:
----------------------------+-----------------------------------------------
Comment(by warner):
ok, I found the bug.. repairer.py instantiates !CiphertextDownloader with
a !Client instance, when it's supposed to be passing a !StorageFarmBroker
instance. They both happen to have a method named get_servers, and the
methods have similar signatures (they both accept a single string and
return an iterable), but different semantics. The result is that the
repairer's downloader was getting zero servers, because it was askinging
with a storage_index where it should have been asking with a service name.
Therefore the downloader didn't send out any queries, so it got no
responses, so it concluded that there were no shares available.
test_repairer still passes because it's using a !NoNetworkClient instead
of the regular !Client, and !NoNetworkClient isn't behaving quite the same
way as !Client (the get_servers method happens to behave like
!StorageFarmBroker).
This was my bad.. I updated a number of places but missed repairer.py .
The !StorageFarmBroker thing, in general, should remove much of the need
for a separate no-network test client (the plan is to use the regular
client but configure it to not talk to an introducer and stuff in a bunch
of loopback'ed storage servers). But in the transition period, this one
fell through.
My plan is to change !NoNetworkClient first, so that test_repairer fails
like it's supposed to, then change one of the get_servers to a different
name (so that the failure turns into an !AttributeError), then finally fix
repairer.py to pass in the correct object. Hopefully I'll get that done
tomorrow.
If you'd like to just fix it (for local testing), edit repairer.py line 53
(in Repairer.start) and change the first argument of
{{{download.CiphertextDownloader}}} from {{{self._client}}} to
{{{self._client.get_storage_broker()}}}. A quick test here suggests that
this should fix the error.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/732#comment:8>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list