Brian Warner
1192b61dfe
upload: fix #758 recursion-loop in peer-selection when servers report errors.
...
The bug was in the code that handles a third-or-later pass, and was
previously untested.
2009-07-17 00:07:09 -05:00
Brian Warner
efa608a135
'tahoe stats': tolerate empty directories. Closes #693 .
2009-07-15 00:51:09 -07:00
Brian Warner
7950fc0f2e
node.py: record pid in twisted log at startup. Closes #476 .
2009-07-15 00:29:29 -07:00
Brian Warner
d8ba8c2eb5
Allow tests to pass with -OO by turning some AssertionErrors (the ones that
...
we actually exercise during tests) into more specific exceptions, so they
don't get optimized away. The best rule to follow is probably this: if an
exception is worth testing, then it's part of the API, and AssertionError
should never be part of the API. Closes #749 .
2009-07-14 23:45:10 -07:00
Zooko O'Whielacronx
10ad3ad7d6
wui: fix test for welcome page
2009-07-14 20:34:29 -07:00
Zooko O'Whielacronx
eb5ecc931d
wui: adjust headers/titles and "Attach something to this directory" text in accordance with #691
...
Also name it as "TahoeLAFS" in this text.
2009-07-14 19:58:14 -07:00
Zooko O'Whielacronx
2f704ed001
dirnode: finish renaming "iv" to "salt" in the code and the hash tag
2009-07-12 17:13:20 -07:00
Brian Warner
7f1d8b7c46
dirnode.py/_encrypt_rwcap: rename IV to "salt", which is more accurate
2009-07-13 00:50:25 +01:00
Brian Warner
c1d5717cf0
dirnode.py: security bug: also use child writecap to derive child enc key,
...
not just the dirnode writecap. The previous code (which only hashed the
dirnode writecap) would use the same key for all children, which is very bad.
This is the correct implementation of #750 .
2009-07-13 00:47:50 +01:00
kevan
d71adaf1ca
Use CachingDict instead of dict in dirnode.py
2009-07-03 20:43:01 -07:00
Zooko O'Whielacronx
34213cd2c7
directories: fix semantic conflict between my "keep track of position" optimization patch and Kevan's "cache serialized entries" optimization patch
2009-07-09 20:20:28 -07:00
kevan
44c652fbbe
Modify bench_dirnode.py to use CachingDict.
2009-07-05 15:31:42 -07:00
kevan
325793457d
Add tests for CachingDict, _pack_contents, _unpack_contents
2009-07-03 20:43:28 -07:00
Zooko O'Whielacronx
0e2d005146
trivial: removed unused import noticed by pyflakes
2009-07-09 06:05:13 -07:00
Zooko O'Whielacronx
786ed012b3
directories: make the IV for the writecaps in directory entries be computed from the secure hash of the writecap itself
...
This makes encoding of directory entries deterministic, and it is also a tad faster on Macbook Pro than getting a random IV with os.urandom(16).
2009-07-04 19:48:15 -07:00
Zooko O'Whielacronx
fcedca966e
tests: raise the timeout on pollmixin from 100s to 1000s -- it looks like it may have triggered too eagerly on Zandr's 266 MHz armel
2009-07-08 21:47:29 -07:00
Zooko O'Whielacronx
22d390acbb
immutable: base32-encode the keys to generate cache filenames that will work on all platforms
2009-07-08 08:26:33 -07:00
Zooko O'Whielacronx
c0d1e7deae
directories: make initialization of the download cache lazy
...
If you open up a directory containing thousands of files, it currently computes the cache filename and checks for the cache file on disk immediately for each immutble file in that directory. With this patch, it delays those steps until you try to do something with an immutable file that could use the cache.
2009-07-07 17:40:40 -07:00
kevan
903005a528
Add CachingDict dict subclass to dirnode.py
2009-07-05 14:23:45 -07:00
Zooko O'Whielacronx
c678e8c77a
directories: rename internal data member download_cache to download_cache_dirman (benchmarks set this internal member and use the new name, so changing this makes the bench_dirnode.py work again)
2009-07-07 07:34:04 -07:00
Zooko O'Whielacronx
efafcfb91a
directories: keep track of your position as you decode netstring after netstring from an input buffer instead of copying the trailing part
...
This makes decoding linear in the number of netstrings instead of O(N^2).
2009-07-04 19:51:09 -07:00
Zooko O'Whielacronx
4206a2c1c7
directories: in bench_dirnode.py, use a real CacheDirectoryManager instead of a fake one (because CacheDirectoryManager is a significant user of CPU and/or time)
2009-07-06 20:41:19 -07:00
Zooko O'Whielacronx
0df5b446eb
directories: make the profiling behavior of bench_dirnode.py accessible by adding '--profile' to the cmdline
2009-07-06 20:30:35 -07:00
Zooko O'Whielacronx
e414c73877
directories: update the directory benchmarks to exercise the unpack-and-repack functionality, and add optional profiling
2009-07-05 09:29:53 -07:00
Zooko O'Whielacronx
859d7ba8b0
test/benchmark: benchmark the time to pack and unpack dirnodes
...
See also the prof_benchmarks() function in this file which will run the benchmarks under profiling.
2009-07-04 15:43:00 -07:00
Brian Warner
ef1b6ae8e3
Tolerate unknown URI types in directory structures. Part of #683 .
...
The idea is that future versions of Tahoe will add new URI types that this
version won't recognize, but might store them in directories that we *can*
read. We should handle these "objects from the future" as best we can.
Previous releases of Tahoe would just explode. With this change, we'll
continue to be able to work with everything else in the directory.
The code change is to wrap anything we don't recognize as an UnknownNode
instance (as opposed to a FileNode or DirectoryNode). Then webapi knows how
to render these (mostly by leaving fields blank), deep-check knows to skip
over them, deep-stats counts them in "count-unknown". You can rename and
delete these things, but you can't add new ones (because we wouldn't know how
to generate a readcap to put into the dirnode's rocap slot, and because this
lets us catch typos better).
2009-07-02 18:07:49 -07:00
Brian Warner
4a46e91192
test_client.py: minor refactoring of BASECONFIG usage
2009-07-02 17:54:50 -07:00
Brian Warner
6237aeabd7
create_node_from_uri: take both writecap+readcap, move logic out of dirnode.py
2009-07-02 15:25:37 -07:00
Brian Warner
656277ac98
dirnode.py: prepare to preserve both rwcap+rocap when copying
...
This will make it easier to tolerate unknown nodes safely.
2009-07-02 14:12:54 -07:00
Brian Warner
3dedfed9de
interfaces.py: wrap some lines to 80cols
2009-07-01 18:57:28 -07:00
Brian Warner
b640baf500
cli: webopen: when called with no arguments, open the Welcome page
2009-07-01 13:05:48 -07:00
Brian Warner
e330abc3c3
mutable repairer: skip repair of readcaps instead of throwing an exception.
...
This should improve the behavior of #625 a bit: at least all the files will
get repaired.
2009-06-30 18:13:43 -07:00
Brian Warner
4194565b3d
interfaces.py: improve ICheckAndRepairResults docs a bit
2009-06-30 17:19:25 -07:00
Brian Warner
8fca155a66
repairer.py: wrap to 80cols. No code changes.
2009-06-30 17:00:47 -07:00
Brian Warner
52fa421430
use 522-bit RSA keys in all unit tests (except one)
...
This reduces the total test time on my laptop from 400s to 283s.
* src/allmydata/test/test_system.py (SystemTest.test_mutable._test_debug):
Remove assertion about container_size/data_size, this changes with keysize
and was too variable anyways.
* src/allmydata/mutable/filenode.py (MutableFileNode.create): add keysize=
* src/allmydata/dirnode.py (NewDirectoryNode.create): same
* src/allmydata/client.py (Client.DEFAULT_MUTABLE_KEYSIZE): add default,
this overrides the one in MutableFileNode
2009-06-29 15:31:24 -07:00
Brian Warner
c6ae255847
remove trailing whitespace
2009-06-29 13:03:58 -07:00
Brian Warner
dddc2d0378
remove trailing whitespace from some util classes
2009-06-29 13:03:41 -07:00
Brian Warner
d0f80579a5
repairer: raise a better exception when faced with a readonly filenode. Still
...
produces an error, though.
2009-06-25 23:32:30 -07:00
Brian Warner
97ffc8a418
mutable/filenode.py: set _writekey to None, rather than leaving it missing
...
This will at least turn the really really weird error when a repair of a
readonly mutable file is attempted into a merely really weird assertion that
mentions "repair currently requires a writecap".
2009-06-25 23:20:22 -07:00
Brian Warner
b43672c9f5
one last tweak
2009-06-25 22:26:27 -07:00
Brian Warner
08effc6499
more 'tahoe cp' docs tweaks
2009-06-25 22:16:52 -07:00
Brian Warner
b30db031ab
cli.py: minor tweaks to test posthooks
2009-06-25 19:45:57 -07:00
Brian Warner
df1ddf83f5
cli.py: update comments on 'tahoe cp' --help a bit
2009-06-25 19:38:37 -07:00
Brian Warner
8d5cc756f0
cli: add some --help text to 'tahoe cp'
2009-06-25 16:57:51 -07:00
Brian Warner
2adc184668
make it possible to add/renew-lease from the WUI
...
add add/renew-lease checkbox on the "more info" page check/deep-check forms
2009-06-25 16:18:24 -07:00
Brian Warner
2947da457e
hush pyflakes
2009-06-24 19:18:09 -07:00
Brian Warner
bd6ecc9f44
Split out NoSharesError, stop adding attributes to NotEnoughSharesError, change humanize_failure to include the original exception string, update tests, behave better if humanize_failure fails.
2009-06-24 19:17:07 -07:00
Brian Warner
837733641f
remove introducer/old.py, will create something similar when the RIIntroducer changes
2009-06-24 12:40:38 -07:00
midnightmagic
96cda877ff
Basically just a trivial platform detection patch for NetBSD.
2009-06-17 16:36:47 -07:00
Brian Warner
f573bb2929
check_grid.py: print stderr when a subcommand fails
2009-06-22 19:28:33 -07:00