Commit Graph

3539 Commits

Author SHA1 Message Date
Zooko O'Whielacronx
1d84606d52 client: add get_servers() 2008-12-08 17:04:00 -07:00
Brian Warner
278c47b9bd mutable publish: if we are surprised by shares that match what we would have written anyways, don't be surprised. This should fix one of the two #546 problems, in which we re-use a server and forget that we already sent them a share. 2008-12-09 22:44:49 -07:00
Brian Warner
d51c6fa4e7 NEWS: updated to most recent user-visible changes, including the 8123-to-3456 change 2008-12-09 17:11:46 -07:00
Zooko O'Whielacronx
db566db31a immutable: remove unused code to produce plaintext hashes 2008-12-09 16:45:46 -07:00
Zooko O'Whielacronx
c3edae5158 finish renaming 'subshare' to 'block' in immutable/encode.py and in docs/ 2008-12-09 16:33:18 -07:00
Zooko O'Whielacronx
09b7151b6f introducer: fix bug in recent simplification caught by Brian's sharp code-reviewing eye 2008-12-08 17:16:34 -07:00
Zooko O'Whielacronx
a84581fcff introducer: simplify get_permuted_peers() implementation and add get_peers() 2008-12-08 16:57:25 -07:00
Brian Warner
d1d2d0b686 webapi.txt: minor edits 2008-12-08 15:32:56 -07:00
Zooko O'Whielacronx
c456ff8591 rename "get_verifier()" to "get_verify_cap()" 2008-12-08 12:44:11 -07:00
Zooko O'Whielacronx
9fba028892 setup: try depending on setuptools >= 0.6c6 instead of >= 0.6c7 at run-time, to be able to use the setuptools that came with Ubuntu Gutsy 2008-12-08 11:47:25 -07:00
Zooko O'Whielacronx
8e22556e66 setup: loosen requirement on simplejson to >= 1.4
That's the version of simplejson that comes with ubuntu feisty, and the one that we've required for most of our history.  Currently the Ubuntu dapper buildslave fails (see issue #534), and setting the simplejson requirement to be >= 2.0 would fix that failure, but I don't understand why.
2008-12-08 08:35:37 -07:00
Zooko O'Whielacronx
9d729109d2 setup: require simplejson >= 1.7.1
That's the version that comes with gutsy, and we don't really understand why increasing the required version number helped with issue #553.
2008-12-07 22:34:12 -07:00
Zooko O'Whielacronx
16b20794dd mutable: merge renaming with test patches 2008-12-07 08:45:19 -07:00
Zooko O'Whielacronx
b58875fe43 mutable: rename mutable/node.py to mutable/filenode.py and mutable/repair.py to mutable/repairer.py
To be more consistent with the immutable layout that I am working on.
2008-12-07 08:20:08 -07:00
Brian Warner
735b3493f1 web/directory.py: really really fix #553. Unfortunately it's tricky to simulate the behavior of a brower's relative-url handling in a unit test. 2008-12-05 23:14:12 -07:00
francois
db7ad6da12 filenode.py: Fix partial HTTP Range header handling according to RFC2616
Tahoe webapi was failing on HTTP request containing a partial Range header.
This change allows movies players like mplayer to seek in movie files stored in
tahoe.

Associated tests for GET and HEAD methods are also included
2008-11-18 07:41:35 -07:00
Brian Warner
ffb5985146 mutable.modify(): after UCWE, publish even if the second invocation of the modifier didn't modify anything. For #551. 2008-12-05 22:49:23 -07:00
Brian Warner
7a0afb59a4 dirnode.py: dirnode.delete which hits UCWE should not fail with NoSuchChildError. Fixes #550. 2008-12-05 22:08:37 -07:00
Brian Warner
fb9af2c7a0 MutableFileNode.modify: pass first_time= and servermap= to the modifier callback 2008-12-05 22:07:10 -07:00
Brian Warner
6ec352fe92 misc/cpu-watcher.tac: tolerate disk-full errors when writing the pickle, and pickle corruption from earlier disk-full errors 2008-12-05 15:54:12 -07:00
Zooko O'Whielacronx
21d88a0cba web: fix more info links again
Really, *really* closes #553.
2008-12-05 15:39:39 -07:00
Zooko O'Whielacronx
dd834cf7e9 web: fix moreinfo link 2008-12-05 15:29:39 -07:00
Zooko O'Whielacronx
93cd0f58a9 web: "More Info" link describes the same file that the "file" link points to, rather than to the file under the same name in this directory
It's a subtle but real difference.
Fixes #553 -- "More Info" link should point to a file/dir, not a dir+childname .
2008-12-05 15:05:02 -07:00
Zooko O'Whielacronx
60bbc46a53 minor: fix unused imports -- thanks, pyflakes 2008-12-05 13:07:23 -07:00
Zooko O'Whielacronx
b315619d6b download: refactor handling of URI Extension Block and crypttext hash tree, simplify things
Refactor into a class the logic of asking each server in turn until one of them gives an answer 
that validates.  It is called ValidatedThingObtainer.

Refactor the downloading and verification of the URI Extension Block into a class named 
ValidatedExtendedURIProxy.

The new logic of validating UEBs is minimalist: it doesn't require the UEB to contain any 
unncessary information, but of course it still accepts such information for backwards 
compatibility (so that this new download code is able to download files uploaded with old, and 
for that matter with current, upload code).

The new logic of validating UEBs follows the practice of doing all validation up front.  This 
practice advises one to isolate the validation of incoming data into one place, so that all of 
the rest of the code can assume only valid data.

If any redundant information is present in the UEB+URI, the new code cross-checks and asserts 
that it is all fully consistent.  This closes some issues where the uploader could have 
uploaded inconsistent redundant data, which would probably have caused the old downloader to 
simply reject that download after getting a Python exception, but perhaps could have caused 
greater harm to the old downloader.

I removed the notion of selecting an erasure codec from codec.py based on the string that was 
passed in the UEB.  Currently "crs" is the only such string that works, so 
"_assert(codec_name == 'crs')" is simpler and more explicit.  This is also in keeping with the 
"validate up front" strategy -- now if someone sets a different string than "crs" in their UEB, 
the downloader will reject the download in the "validate this UEB" function instead of in a 
separate "select the codec instance" function.

I removed the code to check plaintext hashes and plaintext Merkle Trees.  Uploaders do not 
produce this information any more (since it potentially exposes confidential information about 
the file), and the unit tests for it were disabled.  The downloader before this patch would 
check that plaintext hash or plaintext merkle tree if they were present, but not complain if 
they were absent.  The new downloader in this patch complains if they are present and doesn't 
check them.  (We might in the future re-introduce such hashes over the plaintext, but encrypt 
the hashes which are stored in the UEB to preserve confidentiality.  This would be a double-
check on the correctness of our own source code -- the current Merkle Tree over the ciphertext 
is already sufficient to guarantee the integrity of the download unless there is a bug in our 
Merkle Tree or AES implementation.) 

This patch increases the lines-of-code count by 8 (from 17,770 to 17,778), and reduces the 
uncovered-by-tests lines-of-code count by 24 (from 1408 to 1384).  Those numbers would be more 
meaningful if we omitted src/allmydata/util/ from the test-coverage statistics.
2008-12-05 08:17:54 -07:00
Brian Warner
a0b5b5ab2b test_web: add get_permuted_peers, to unbreak recent checker_results change 2008-12-05 02:12:10 -07:00
Brian Warner
42f8aece05 web checker_results: include a table of servers in permuted order, so you can see the places where new servers have been inserted 2008-12-05 02:03:09 -07:00
Brian Warner
e942ab141b test_system.py: assert less about the stats we get, since shares (and thus allocate() calls) are distributed randomly 2008-12-04 17:27:04 -07:00
Brian Warner
7c4edac582 stats: don't return booleans: it violates the schema. Add a test. 2008-12-04 15:01:24 -07:00
Brian Warner
7cfc74bcc9 test_system.py: don't ask the stats-gatherer to poll: it tolerates failures, so it isn't really giving us enough test coverage. Removing the call will make it more clear that we need to improve the tests later 2008-12-04 15:00:53 -07:00
Peter Secor
a8e515a8bb confwiz.py - removing hardcoded version number 2008-12-02 20:38:31 -07:00
Brian Warner
a2ce315074 CLI: check for pre-existing aliases in 'tahoe create-alias' and 'tahoe add-alias' 2008-12-02 20:20:22 -07:00
Brian Warner
cdbb72d5ff test_cli: pass rc out of do_cli() too 2008-12-02 20:08:28 -07:00
Zooko O'Whielacronx
c43d7dd5f0 setup: one more address to send release announcements to 2008-12-02 19:50:40 -07:00
Zooko O'Whielacronx
f436b8cd88 setup: another note about the process of making a tahoe release: mail to duplicity-talk@nongnu.org 2008-12-02 19:44:14 -07:00
Brian Warner
6958b7fa90 test_storage.py: more windows-vs-readonly-storage fixes 2008-12-02 19:41:02 -07:00
Brian Warner
2a640af485 docs/webapi.txt: update helper section to discuss tahoe.cfg 2008-12-02 19:07:26 -07:00
Brian Warner
ed211e8574 docs/webapi.txt: update to discuss tahoe.cfg, not BASEDIR/webport 2008-12-02 19:06:12 -07:00
Brian Warner
fe9c3e9529 storage.py: oops, fix windows again, readonly_storage wasn't getting picked up properly 2008-12-02 19:03:17 -07:00
Brian Warner
d3783475b4 test_download.py: remove extra base32 import 2008-12-02 18:31:26 -07:00
Brian Warner
b997e6ca7c test_download: test both mutable and immutable pre-generated shares 2008-12-02 18:30:07 -07:00
Brian Warner
2d70f7fc0b test_download.py: added 'known-answer-tests', to make sure current code can download a file that was created by earlier code 2008-12-02 18:22:08 -07:00
Brian Warner
83993ae579 docs/configuration.txt: fix minor typo 2008-12-02 15:51:01 -07:00
Brian Warner
d295a7afb9 storage.py: unbreak readonly_storage=True on windows 2008-12-01 19:49:46 -07:00
Brian Warner
71c62f8fcb #542 'tahoe create-key-generator': fix the .tac file this creates to be compatible with modern code, add a test 2008-12-01 17:47:21 -07:00
Brian Warner
c5222558f4 storage.py: fix minor typo in comment 2008-12-01 17:25:40 -07:00
Brian Warner
cfba882b30 storage: replace sizelimit with reserved_space, make the stats 'disk_avail' number incorporate this reservation 2008-12-01 17:24:21 -07:00
Brian Warner
39a41f1d85 util/abbreviate: add abbreviated-size parser 2008-12-01 17:24:12 -07:00
Zooko O'Whielacronx
fe6abac87b wui/wapi: change the default port number from 8123 to 3456 to avoid conflict with TorButton
See ticket #536 for details.
2008-11-25 17:57:37 -07:00
Zooko O'Whielacronx
5ebd731982 setup: move the requirement on simplejson from setup.py to _auto_deps.py, and loosen it from >= 2.0.5 to > 1.8.1
We'll see if this fixes the tests on all of our current buildslaves, and if it does then I'll be happy to leave it at "> 1.8.1" for now, even though I don't know exactly what versions of simplejson changed exactly what behavior that interacts with exactly what environment.  See http://allmydata.org/trac/tahoe/ticket/534 for uncertainties.
2008-11-25 14:37:51 -07:00