]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/log
tahoe-lafs/tahoe-lafs.git
14 years agotest_provisioning: STAN is not always a list. Fix by David-Sarah Hopwood.
Brian Warner [Fri, 15 Jan 2010 01:46:32 +0000 (17:46 -0800)]
test_provisioning: STAN is not always a list. Fix by David-Sarah Hopwood.

14 years agoweb/directory.py mkdir-immutable: hush pyflakes, add TODO for #903 behavior
Brian Warner [Thu, 14 Jan 2010 22:28:04 +0000 (14:28 -0800)]
web/directory.py mkdir-immutable: hush pyflakes, add TODO for #903 behavior

14 years agohush pyflakes-0.4.0 warnings: slightly less-trivial fixes. Closes #900.
Brian Warner [Thu, 14 Jan 2010 22:17:19 +0000 (14:17 -0800)]
hush pyflakes-0.4.0 warnings: slightly less-trivial fixes. Closes #900.

This includes one fix (in test_web) which was testing the wrong thing.

14 years agohush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900.
Brian Warner [Thu, 14 Jan 2010 22:15:29 +0000 (14:15 -0800)]
hush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900.

14 years agotahoe add-alias/create-alias: don't corrupt non-newline-terminated alias
Brian Warner [Thu, 14 Jan 2010 21:02:46 +0000 (13:02 -0800)]
tahoe add-alias/create-alias: don't corrupt non-newline-terminated alias
file. Closes #741.

14 years agochange docs and --help to use "grid" instead of "virtual drive": closes #892.
Brian Warner [Thu, 14 Jan 2010 20:11:19 +0000 (12:11 -0800)]
change docs and --help to use "grid" instead of "virtual drive": closes #892.

Thanks to David-Sarah Hopwood for the patch.

14 years agobackupdb.txt: fix ST_CTIME reference
Brian Warner [Thu, 14 Jan 2010 19:40:52 +0000 (11:40 -0800)]
backupdb.txt: fix ST_CTIME reference

14 years agoclient.py: fix/update comments on KeyGenerator
Brian Warner [Wed, 13 Jan 2010 00:42:26 +0000 (16:42 -0800)]
client.py: fix/update comments on KeyGenerator

14 years agoClean up log.err calls, for one of the issues in #889.
Brian Warner [Tue, 12 Jan 2010 01:33:43 +0000 (17:33 -0800)]
Clean up log.err calls, for one of the issues in #889.

allmydata.util.log.err() either takes a Failure as the first positional
argument, or takes no positional arguments and must be invoked in an
exception handler. Fixed its signature to match both foolscap.logging.log.err
and twisted.python.log.err . Included a brief unit test.

14 years agotidy up DeadReferenceError handling, ignore them in add_lease calls
Brian Warner [Tue, 12 Jan 2010 00:07:23 +0000 (16:07 -0800)]
tidy up DeadReferenceError handling, ignore them in add_lease calls

Stop checking separately for ConnectionDone/ConnectionLost, since those have
been folded into DeadReferenceError since foolscap-0.3.1 . Write
rrefutil.trap_deadref() in terms of rrefutil.trap_and_discard() to improve
code coverage.

14 years agoNEWS: improve "tahoe backup" notes, mention first-backup-after-upgrade duration
Brian Warner [Mon, 11 Jan 2010 19:01:32 +0000 (11:01 -0800)]
NEWS: improve "tahoe backup" notes, mention first-backup-after-upgrade duration

Thanks to Francois Deppierraz for the suggestion.

14 years agotest_repairer: add (commented-out) test_each_byte, to see exactly what the
Brian Warner [Sun, 10 Jan 2010 20:35:52 +0000 (12:35 -0800)]
test_repairer: add (commented-out) test_each_byte, to see exactly what the
Verifier misses

The results (described in #819) match our expectations: it misses corruption
in unused share fields and in most container fields (which are only visible
to the storage server, not the client). 1265 bytes of a 2753 byte
share (hosting a 56-byte file with an artifically small segment size) are
unused, mostly in the unused tail of the overallocated UEB space (765 bytes),
and the allocated-but-unwritten plaintext_hash_tree (480 bytes).

14 years agorepairer: fix some wrong offsets in the randomized verifier tests, debugged by Brian
Zooko O'Whielacronx [Sun, 10 Jan 2010 20:37:21 +0000 (12:37 -0800)]
repairer: fix some wrong offsets in the randomized verifier tests, debugged by Brian
fixes #819

14 years agotest_repairer: fix colliding basedir names, which caused test inconsistencies
Brian Warner [Sun, 10 Jan 2010 08:46:19 +0000 (00:46 -0800)]
test_repairer: fix colliding basedir names, which caused test inconsistencies

14 years agorepairer: add deterministic test for #819, mark as TODO
Zooko O'Whielacronx [Sun, 10 Jan 2010 01:36:19 +0000 (17:36 -0800)]
repairer: add deterministic test for #819, mark as TODO

14 years agocontrib/fuse/runtests.py: Tolerate the tahoe CLI returning deprecation warnings
francois [Sat, 9 Jan 2010 17:59:46 +0000 (09:59 -0800)]
contrib/fuse/runtests.py: Tolerate the tahoe CLI returning deprecation warnings

Depending on the versions of external libraries such as Twisted of Foolscap,
the tahoe CLI can display deprecation warnings on stdout.  The tests should
not interpret those warnings as a failure if the node is in fact correctly
started.

See http://allmydata.org/trac/tahoe/ticket/859 for an example of deprecation
warnings.

fixes #876

14 years agocontrib: fix fuse_impl_c to use new Python API
Zooko O'Whielacronx [Sat, 9 Jan 2010 17:49:56 +0000 (09:49 -0800)]
contrib: fix fuse_impl_c to use new Python API
original patch by Thomas Delaet, fixed by François, reviewed by Brian, committed by me

14 years agodocs: CREDITS: add David-Sarah to the CREDITS file
Zooko O'Whielacronx [Sat, 9 Jan 2010 06:04:35 +0000 (22:04 -0800)]
docs: CREDITS: add David-Sarah to the CREDITS file

14 years agomutable/publish: don't loop() right away upon DeadReferenceError. Closes #877
Brian Warner [Sat, 2 Jan 2010 22:08:41 +0000 (14:08 -0800)]
mutable/publish: don't loop() right away upon DeadReferenceError. Closes #877

The bug was that a disconnected server could cause us to re-enter the initial
loop() call, sending multiple queries to a single server, provoking an
incorrect UCWE. To fix it, stall the loop() with an eventual.fireEventually()

14 years agoimmutable/checker.py: oops, forgot some imports. Also hush pyflakes.
Brian Warner [Tue, 29 Dec 2009 23:39:09 +0000 (15:39 -0800)]
immutable/checker.py: oops, forgot some imports. Also hush pyflakes.

14 years agomutable repair: return successful=False when numshares<k (thus repair fails),
Brian Warner [Tue, 29 Dec 2009 23:37:46 +0000 (15:37 -0800)]
mutable repair: return successful=False when numshares<k (thus repair fails),
instead of weird errors. Closes #874 and #786.

Previously, if the file had 0 shares, this would raise TypeError as it tried
to call download_version(None). If the file had some shares but fewer than
'k', it would incorrectly raise MustForceRepairError.

Added get_successful() to the IRepairResults API, to give repair() a place to
report non-code-bug problems like this.

14 years agonode.py/interfaces.py: minor docs fixes
Brian Warner [Tue, 29 Dec 2009 23:04:09 +0000 (15:04 -0800)]
node.py/interfaces.py: minor docs fixes

14 years agoNEWS: fix 1.4.1 announcement w.r.t. add-lease behavior in older releases
Brian Warner [Tue, 29 Dec 2009 23:03:10 +0000 (15:03 -0800)]
NEWS: fix 1.4.1 announcement w.r.t. add-lease behavior in older releases

14 years agochecker: don't let failures in add-lease affect checker results. Closes #875.
Brian Warner [Tue, 29 Dec 2009 23:01:08 +0000 (15:01 -0800)]
checker: don't let failures in add-lease affect checker results. Closes #875.

Mutable servermap updates and the immutable checker, when run with
add_lease=True, send both the do-you-have-block and add-lease commands in
parallel, to avoid an extra round trip time. Many older servers have problems
with add-lease and raise various exceptions, which don't generally matter.
The client-side code was catching+ignoring some of them, but unrecognized
exceptions were passed through to the DYHB code, concealing the DYHB results
from the checker, making it think the server had no shares.

The fix is to separate the code paths. Both commands are sent at the same
time, but the errback path from add-lease is handled separately. Known
exceptions are ignored, the others (both unknown-remote and all-local) are
logged (log.WEIRD, which will trigger an Incident), but neither will affect
the DYHB results.

The add-lease message is sent first, and we know that the server handles them
synchronously. So when the checker is done, we can be sure that all the
add-lease messages have been retired. This makes life easier for unit tests.

14 years agotest_cli: verify fix for "tahoe get" not creating empty file on error (#121)
Brian Warner [Sun, 27 Dec 2009 23:54:44 +0000 (18:54 -0500)]
test_cli: verify fix for "tahoe get" not creating empty file on error (#121)

14 years agoaddendum to "Fix 'tahoe ls' on files (#771)"
Brian Warner [Sun, 27 Dec 2009 23:21:49 +0000 (18:21 -0500)]
addendum to "Fix 'tahoe ls' on files (#771)"

tahoe_ls.py: tolerate missing metadata
web/filenode.py: minor cleanups
test_cli.py: test 'tahoe ls FILECAP'

14 years agoFix 'tahoe ls' on files (#771). Patch adapted from Kevan Carstensen.
Brian Warner [Sun, 27 Dec 2009 22:54:43 +0000 (17:54 -0500)]
Fix 'tahoe ls' on files (#771). Patch adapted from Kevan Carstensen.

web/filenode.py: also serve edge metadata when using t=json on a
                 DIRCAP/childname object.
tahoe_ls.py: list file objects as if we were listing one-entry directories.
             Show edge metadata if we have it, which will be true when doing
             'tahoe ls DIRCAP/filename' and false when doing 'tahoe ls
             FILECAP'

14 years agotahoe_get: don't create the output file on error. Closes #121.
Brian Warner [Sun, 27 Dec 2009 22:04:04 +0000 (17:04 -0500)]
tahoe_get: don't create the output file on error. Closes #121.

14 years agowebapi: don't accept zero-length childnames during traversal. Closes #358, #676.
Brian Warner [Sun, 27 Dec 2009 20:10:43 +0000 (15:10 -0500)]
webapi: don't accept zero-length childnames during traversal. Closes #358, #676.

This forbids operations that would implicitly create a directory with a
zero-length (empty string) name, like what you'd get if you did "tahoe put
local /oops/blah" (#358) or "POST /uri/CAP//?t=mkdir" (#676). The error
message is fairly friendly too.

Also added code to "tahoe put" to catch this error beforehand and suggest the
correct syntax (i.e. without the leading slash).

14 years agoCLI: send 'Accept:' header to ask for text/plain tracebacks. Closes #646.
Brian Warner [Sun, 27 Dec 2009 19:58:28 +0000 (14:58 -0500)]
CLI: send 'Accept:' header to ask for text/plain tracebacks. Closes #646.

The webapi has been looking for an Accept header since 1.4.0, but it treats a
missing header as equal to */* (to honor RFC2616). This change finally
modifies our CLI tools to ask for "text/plain, application/octet-stream",
which seems roughly correct (we either want a plain-text traceback or error
message, or an uninterpreted chunk of binary data to save to disk). Some day
we'll figure out how JSON fits into this scheme.

14 years agoMakefile: upload-tarballs: switch from xfer-client to flappclient, closes #350
Brian Warner [Sun, 27 Dec 2009 16:37:03 +0000 (11:37 -0500)]
Makefile: upload-tarballs: switch from xfer-client to flappclient, closes #350

I've also set up a new flappserver on source@allmydata.org to receive the
tarballs. We still need to replace the gutsy buildslave (which is where the
tarballs used to be generated+uploaded) and give it the new FURL.

14 years agomisc/ringsim.py: make it deterministic, more detail about grid-is-full behavior
Brian Warner [Sun, 27 Dec 2009 02:48:32 +0000 (21:48 -0500)]
misc/ringsim.py: make it deterministic, more detail about grid-is-full behavior

14 years agomisc/ringsim.py: tool to discuss #302
Brian Warner [Sat, 26 Dec 2009 06:03:39 +0000 (01:03 -0500)]
misc/ringsim.py: tool to discuss #302

14 years agodocs: fix helper.txt to describe new config style
Zooko O'Whielacronx [Thu, 24 Dec 2009 22:35:22 +0000 (14:35 -0800)]
docs: fix helper.txt to describe new config style

14 years agodocs/stats.txt: add TOC, notes about controlling gatherer's listening port
Brian Warner [Thu, 24 Dec 2009 20:21:33 +0000 (15:21 -0500)]
docs/stats.txt: add TOC, notes about controlling gatherer's listening port

Thanks to Jody Harris for the suggestions.

14 years agoAdd docs/stats.py, explaining Tahoe stats, the gatherer, and the munin plugins.
Brian Warner [Wed, 23 Dec 2009 05:24:00 +0000 (00:24 -0500)]
Add docs/stats.py, explaining Tahoe stats, the gatherer, and the munin plugins.

14 years agomore #859: avoid deprecation warning for unit tests too, hush pyflakes
Brian Warner [Tue, 15 Dec 2009 00:01:47 +0000 (16:01 -0800)]
more #859: avoid deprecation warning for unit tests too, hush pyflakes

* factor maybe-import-sha logic into util.hashutil

14 years agouse hashlib module if available, thus avoiding a DeprecationWarning for importing...
Zooko O'Whielacronx [Mon, 14 Dec 2009 21:27:03 +0000 (13:27 -0800)]
use hashlib module if available, thus avoiding a DeprecationWarning for importing the old sha module; fixes #859

14 years agodocs: reflow architecture.txt to 78-char lines
Zooko O'Whielacronx [Tue, 8 Dec 2009 23:29:43 +0000 (15:29 -0800)]
docs: reflow architecture.txt to 78-char lines

14 years agodocs: update the about.html a little
Zooko O'Whielacronx [Tue, 8 Dec 2009 21:27:37 +0000 (13:27 -0800)]
docs: update the about.html a little

15 years agodocs: remove obsolete doc file "codemap.txt"
Zooko O'Whielacronx [Fri, 13 Nov 2009 16:30:33 +0000 (08:30 -0800)]
docs: remove obsolete doc file "codemap.txt"
I started to update this to reflect the current codebase, but then I thought (a) nobody seemed to notice that it hasn't been updated since December 2007, and (b) it will just bit-rot again, so I'm removing it.

14 years agomutable/retrieve.py: stop reaching into private MutableFileNode attributes
Brian Warner [Tue, 8 Dec 2009 17:29:21 +0000 (09:29 -0800)]
mutable/retrieve.py: stop reaching into private MutableFileNode attributes

14 years agomutable/servermap.py: stop reaching into private MutableFileNode attributes
Brian Warner [Tue, 8 Dec 2009 17:26:08 +0000 (09:26 -0800)]
mutable/servermap.py: stop reaching into private MutableFileNode attributes

14 years agomutable/servermap.py: oops, query N+e servers in MODE_WRITE, not k+e
Brian Warner [Tue, 8 Dec 2009 17:11:56 +0000 (09:11 -0800)]
mutable/servermap.py: oops, query N+e servers in MODE_WRITE, not k+e

under normal conditions, this wouldn't cause any problems, but if the shares
are really sparse (perhaps because new servers were added), then
file-modifies might stop looking too early and leave old shares in place

14 years agocontrol.py: fix speedtest: use download_best_version (not read) on mutable nodes
Brian Warner [Mon, 7 Dec 2009 06:05:12 +0000 (22:05 -0800)]
control.py: fix speedtest: use download_best_version (not read) on mutable nodes

14 years agoFTP-and-SFTP.txt: fix ssh-keygen pointer
Brian Warner [Mon, 7 Dec 2009 05:28:03 +0000 (21:28 -0800)]
FTP-and-SFTP.txt: fix ssh-keygen pointer

14 years agosetup: ignore _darcs in the "test-clean" test and make the "clean" step remove all...
Zooko O'Whielacronx [Sun, 6 Dec 2009 18:48:35 +0000 (10:48 -0800)]
setup: ignore _darcs in the "test-clean" test and make the "clean" step remove all .egg's in the root dir

14 years agoremove MutableFileNode.download(), prefer download_best_version() instead
Brian Warner [Tue, 1 Dec 2009 22:54:38 +0000 (17:54 -0500)]
remove MutableFileNode.download(), prefer download_best_version() instead

14 years agoSimplify immutable download API: use just filenode.read(consumer, offset, size)
Brian Warner [Tue, 1 Dec 2009 22:44:35 +0000 (17:44 -0500)]
Simplify immutable download API: use just filenode.read(consumer, offset, size)

* remove Downloader.download_to_data/download_to_filename/download_to_filehandle
* remove download.Data/FileName/FileHandle targets
* remove filenode.download/download_to_data/download_to_filename methods
* leave Downloader.download (the whole Downloader will go away eventually)
* add util.consumer.MemoryConsumer/download_to_data, for convenience
  (this is mostly used by unit tests, but it gets used by enough non-test
   code to warrant putting it in allmydata.util)
* update tests
* removes about 180 lines of code. Yay negative code days!

Overall plan is to rewrite immutable/download.py and leave filenode.read() as
the sole read-side API.

14 years agoserver.py: undo my bogus 'correction' of David-Sarah's comment fix
Brian Warner [Tue, 1 Dec 2009 02:46:07 +0000 (21:46 -0500)]
server.py: undo my bogus 'correction' of David-Sarah's comment fix

and move it to a better line

14 years agoImplement more coherent behavior when copying with dircaps/filecaps (closes #761...
Brian Warner [Mon, 30 Nov 2009 21:10:09 +0000 (13:10 -0800)]
Implement more coherent behavior when copying with dircaps/filecaps (closes #761). Patch by Kevan Carstensen.

14 years agostorage.py: update comment
Brian Warner [Mon, 30 Nov 2009 19:59:13 +0000 (11:59 -0800)]
storage.py: update comment

14 years agostorage server: detect disk space usage on Windows too (fixes #637)
david-sarah [Sat, 21 Nov 2009 05:56:44 +0000 (21:56 -0800)]
storage server: detect disk space usage on Windows too (fixes #637)

14 years agomake status of finished operations consistently "Finished"
david-sarah [Sat, 21 Nov 2009 06:15:43 +0000 (22:15 -0800)]
make status of finished operations consistently "Finished"

14 years agoNEWS: update with all user-visible changes since the last release
Brian Warner [Fri, 27 Nov 2009 22:42:17 +0000 (17:42 -0500)]
NEWS: update with all user-visible changes since the last release

14 years agoupdate "tahoe backup" docs, and webapi.txt's mkdir-with-children
Brian Warner [Fri, 27 Nov 2009 05:59:00 +0000 (00:59 -0500)]
update "tahoe backup" docs, and webapi.txt's mkdir-with-children

14 years agoAdd dirnodes to backupdb and "tahoe backup", closes #606.
Brian Warner [Thu, 26 Nov 2009 23:42:57 +0000 (15:42 -0800)]
Add dirnodes to backupdb and "tahoe backup", closes #606.

* backups now share dirnodes with any previous backup, in any location,
  so renames and moves are handled very efficiently
* "tahoe backup" no longer bothers reading the previous snapshot
* if you switch grids, you should delete ~/.tahoe/private/backupdb.sqlite,
  to force new uploads of all files and directories

14 years agowebapi: fix t=check for DIR2-LIT (i.e. empty immutable directories)
Brian Warner [Thu, 26 Nov 2009 23:27:31 +0000 (15:27 -0800)]
webapi: fix t=check for DIR2-LIT (i.e. empty immutable directories)

14 years agoPipelineError: fix str() on python2.4 . Closes #842.
Brian Warner [Tue, 24 Nov 2009 21:25:12 +0000 (13:25 -0800)]
PipelineError: fix str() on python2.4 . Closes #842.

14 years agotest_uri.py: s/NewDirnode/Dirnode/ , now that they aren't "new" anymore
Brian Warner [Fri, 20 Nov 2009 07:55:53 +0000 (23:55 -0800)]
test_uri.py: s/NewDirnode/Dirnode/ , now that they aren't "new" anymore

14 years agointerface name cleanups: IFileNode, IImmutableFileNode, IMutableFileNode
Brian Warner [Fri, 20 Nov 2009 07:52:55 +0000 (23:52 -0800)]
interface name cleanups: IFileNode, IImmutableFileNode, IMutableFileNode

The proper hierarchy is:
 IFilesystemNode
 +IFileNode
 ++IMutableFileNode
 ++IImmutableFileNode
 +IDirectoryNode

Also expand test_client.py (NodeMaker) to hit all IFilesystemNode types.

14 years agoclass name cleanups: s/FileNode/ImmutableFileNode/
Brian Warner [Fri, 20 Nov 2009 07:22:39 +0000 (23:22 -0800)]
class name cleanups: s/FileNode/ImmutableFileNode/

also fix test/bench_dirnode.py for recent dirnode changes

14 years agoUse DIR-IMM and t=mkdir-immutable for "tahoe backup", for #828
Brian Warner [Wed, 18 Nov 2009 19:28:13 +0000 (11:28 -0800)]
Use DIR-IMM and t=mkdir-immutable for "tahoe backup", for #828

14 years agoweb/directory.py: use "DIR-IMM" to describe immutable directories, not DIR-RO
Brian Warner [Wed, 18 Nov 2009 19:18:32 +0000 (11:18 -0800)]
web/directory.py: use "DIR-IMM" to describe immutable directories, not DIR-RO

14 years agoweb/info.py: hush pyflakes
Brian Warner [Wed, 18 Nov 2009 19:17:36 +0000 (11:17 -0800)]
web/info.py: hush pyflakes

14 years agomake get_size/get_current_size consistent for all IFilesystemNode classes
Brian Warner [Wed, 18 Nov 2009 19:16:24 +0000 (11:16 -0800)]
make get_size/get_current_size consistent for all IFilesystemNode classes

* stop caching most_recent_size in dirnode, rely upon backing filenode for it
* start caching most_recent_size in MutableFileNode
* return None when you don't know, not "?"
* only render None as "?" in the web "more info" page
* add get_size/get_current_size to UnknownNode

14 years agoImmutableDirectoryURIVerifier: fix verifycap handling
Brian Warner [Wed, 18 Nov 2009 16:42:38 +0000 (08:42 -0800)]
ImmutableDirectoryURIVerifier: fix verifycap handling

14 years agoAdd t=mkdir-immutable to the webapi. Closes #607. trac-4100
Brian Warner [Wed, 18 Nov 2009 07:09:00 +0000 (23:09 -0800)]
Add t=mkdir-immutable to the webapi. Closes #607.

* change t=mkdir-with-children to not use multipart/form encoding. Instead,
  the request body is all JSON. t=mkdir-immutable uses this format too.
* make nodemaker.create_immutable_dirnode() get convergence from SecretHolder,
  but let callers override it
* raise NotDeepImmutableError instead of using assert()
* add mutable= argument to DirectoryNode.create_subdirectory(), default True

14 years agomove convergence secret into SecretHolder, next to lease secret
Brian Warner [Wed, 18 Nov 2009 01:54:44 +0000 (17:54 -0800)]
move convergence secret into SecretHolder, next to lease secret

15 years agonodemaker: implement immutable directories (internal interface), for #607
Brian Warner [Thu, 12 Nov 2009 00:22:33 +0000 (16:22 -0800)]
nodemaker: implement immutable directories (internal interface), for #607

* nodemaker.create_from_cap() now handles DIR2-CHK and DIR2-LIT
* client.create_immutable_dirnode() is used to create them
* no webapi yet

15 years agostop using IURI()/etc as an adapter
Brian Warner [Wed, 11 Nov 2009 22:45:42 +0000 (14:45 -0800)]
stop using IURI()/etc as an adapter

15 years agoclean up uri-vs-cap terminology, emphasize cap instances instead of URI strings
Brian Warner [Wed, 11 Nov 2009 22:25:42 +0000 (14:25 -0800)]
clean up uri-vs-cap terminology, emphasize cap instances instead of URI strings

 * "cap" means a python instance which encapsulates a filecap/dircap (uri.py)
 * "uri" means a string with a "URI:" prefix
 * FileNode instances are created with (and retain) a cap instance, and
   generate uri strings on demand
 * .get_cap/get_readcap/get_verifycap/get_repaircap return cap instances
 * .get_uri/get_readonly_uri return uri strings

* add filenode.download_to_filename() for control.py, should find a better way
* use MutableFileNode.init_from_cap, not .init_from_uri
* directory URI instances: use get_filenode_cap, not get_filenode_uri
* update/cleanup bench_dirnode.py to match, add Makefile target to run it

15 years agoadd parser for immutable directory caps: DIR2-CHK, DIR2-LIT, DIR2-CHK-Verifier
Brian Warner [Wed, 4 Nov 2009 17:24:53 +0000 (09:24 -0800)]
add parser for immutable directory caps: DIR2-CHK, DIR2-LIT, DIR2-CHK-Verifier

15 years agowui: s/TahoeLAFS/Tahoe-LAFS/
Zooko O'Whielacronx [Thu, 29 Oct 2009 02:50:50 +0000 (18:50 -0800)]
wui: s/TahoeLAFS/Tahoe-LAFS/

15 years agotests: bump up the timeout on test_repairer to see if 120 seconds was too short for...
Zooko O'Whielacronx [Tue, 27 Oct 2009 21:48:00 +0000 (13:48 -0800)]
tests: bump up the timeout on test_repairer to see if 120 seconds was too short for François's ARM box to do the test even when it was doing it right.

15 years agodirnode.pack_children(): add deep_immutable= argument
Brian Warner [Mon, 26 Oct 2009 16:28:09 +0000 (09:28 -0700)]
dirnode.pack_children(): add deep_immutable= argument

This will be used by DIR2:CHK to enforce the deep-immutability requirement.

15 years agowebapi: use t=mkdir-with-children instead of a children= arg to t=mkdir .
Brian Warner [Mon, 26 Oct 2009 01:13:21 +0000 (18:13 -0700)]
webapi: use t=mkdir-with-children instead of a children= arg to t=mkdir .

This is safer: in the earlier API, an old webapi server would silently ignore
the initial children, and clients trying to set them would have to fetch the
newly-created directory to discover the incompatibility. In the new API,
clients using t=mkdir-with-children against an old webapi server will get a
clear error.

15 years agonodemaker.create_new_mutable_directory: pack_children() in initial_contents=
Brian Warner [Sat, 17 Oct 2009 20:31:46 +0000 (13:31 -0700)]
nodemaker.create_new_mutable_directory: pack_children() in initial_contents=
instead of creating an empty file and then adding the children later.

This should speed up mkdir(initial_children) considerably, removing two
roundtrips and an entire read-modify-write cycle, probably bringing it down
to a single roundtrip. A quick test (against the volunteergrid) suggests a
30% speedup.

test_dirnode: add new tests to enforce the restrictions that interfaces.py
claims for create_new_mutable_directory(): no UnknownNodes, metadata dicts

15 years agotest_dirnode.py: add tests of initial_children= args to client.create_dirnode
Brian Warner [Sat, 17 Oct 2009 19:41:59 +0000 (12:41 -0700)]
test_dirnode.py: add tests of initial_children= args to client.create_dirnode
and nodemaker.create_new_mutable_directory

15 years agoupdate many dirnode interfaces to accept dict-of-nodes instead of dict-of-caps
Brian Warner [Sat, 17 Oct 2009 19:28:29 +0000 (12:28 -0700)]
update many dirnode interfaces to accept dict-of-nodes instead of dict-of-caps

interfaces.py: define INodeMaker, document argument values, change
               create_new_mutable_directory() to take dict-of-nodes. Change
               dirnode.set_nodes() and dirnode.create_subdirectory() too.
nodemaker.py: use INodeMaker, update create_new_mutable_directory()
client.py: have create_dirnode() delegate initial_children= to nodemaker
dirnode.py (Adder): take dict-of-nodes instead of list-of-nodes, which
                    updates set_nodes() and create_subdirectory()
web/common.py (convert_initial_children_json): create dict-of-nodes
web/directory.py: same
web/unlinked.py: same
test_dirnode.py: update tests to match

15 years agodirnode.py: move pack_children() out to a function, for eventual use by others
Brian Warner [Sat, 17 Oct 2009 18:07:07 +0000 (11:07 -0700)]
dirnode.py: move pack_children() out to a function, for eventual use by others

15 years agomove dirnode.CachingDict to dictutil.AuxValueDict, generalize method names,
Brian Warner [Sat, 17 Oct 2009 18:00:05 +0000 (11:00 -0700)]
move dirnode.CachingDict to dictutil.AuxValueDict, generalize method names,
improve tests. Let dirnode _pack_children accept either dict or AuxValueDict.

15 years agotest/common.py: update FakeMutableFileNode to new contents= callable scheme
Brian Warner [Tue, 13 Oct 2009 05:21:54 +0000 (22:21 -0700)]
test/common.py: update FakeMutableFileNode to new contents= callable scheme

15 years agoThe initial_children= argument to nodemaker.create_new_mutable_directory is
Brian Warner [Tue, 13 Oct 2009 03:19:22 +0000 (20:19 -0700)]
The initial_children= argument to nodemaker.create_new_mutable_directory is
now enabled.

15 years agoclient.create_mutable_file(contents=) now accepts a callable, which is
Brian Warner [Tue, 13 Oct 2009 03:12:32 +0000 (20:12 -0700)]
client.create_mutable_file(contents=) now accepts a callable, which is
invoked with the new MutableFileNode and is supposed to return the initial
contents. This can be used by e.g. a new dirnode which needs the filenode's
writekey to encrypt its initial children.

create_mutable_file() still accepts a bytestring too, or None for an empty
file.

15 years agowebapi: t=mkdir now accepts initial children, using the same JSON that t=json
Brian Warner [Tue, 13 Oct 2009 02:34:44 +0000 (19:34 -0700)]
webapi: t=mkdir now accepts initial children, using the same JSON that t=json
emits.

client.create_dirnode(initial_children=) now works.

15 years agoreplace dirnode.create_empty_directory() with create_subdirectory(), which
Brian Warner [Tue, 13 Oct 2009 02:15:20 +0000 (19:15 -0700)]
replace dirnode.create_empty_directory() with create_subdirectory(), which
takes an initial_children= argument

15 years agodirnode.set_children: change return value: fire with self instead of None
Brian Warner [Tue, 13 Oct 2009 01:50:26 +0000 (18:50 -0700)]
dirnode.set_children: change return value: fire with self instead of None

15 years agodirnode.set_nodes: change return value: fire with self instead of None
Brian Warner [Tue, 13 Oct 2009 01:45:46 +0000 (18:45 -0700)]
dirnode.set_nodes: change return value: fire with self instead of None

15 years agodirnode.set_children: take a dict, not a list
Brian Warner [Tue, 13 Oct 2009 00:24:40 +0000 (17:24 -0700)]
dirnode.set_children: take a dict, not a list

15 years agodirnode.set_uri/set_children: change signature to take writecap+readcap
Brian Warner [Mon, 12 Oct 2009 23:51:26 +0000 (16:51 -0700)]
dirnode.set_uri/set_children: change signature to take writecap+readcap
instead of a single cap. The webapi t=set_children call benefits too.

15 years agoreplace Client.create_empty_dirnode() with create_dirnode(), in anticipation
Brian Warner [Mon, 12 Oct 2009 22:45:06 +0000 (15:45 -0700)]
replace Client.create_empty_dirnode() with create_dirnode(), in anticipation
of adding initial_children= argument.

Includes stubbed-out initial_children= support.

15 years agotest_web.py: use a less-fake client, making test harness smaller
Brian Warner [Mon, 12 Oct 2009 22:28:08 +0000 (15:28 -0700)]
test_web.py: use a less-fake client, making test harness smaller

15 years agowebapi.txt: document t=set_children, other small edits
Brian Warner [Fri, 9 Oct 2009 20:04:46 +0000 (13:04 -0700)]
webapi.txt: document t=set_children, other small edits

15 years agoVerifier: check the full cryptext-hash tree on each share. Removed .todos
Brian Warner [Mon, 5 Oct 2009 22:18:49 +0000 (15:18 -0700)]
Verifier: check the full cryptext-hash tree on each share. Removed .todos
from the last few test_repairer tests that were waiting on this.

15 years agoVerifier: check the full block-hash-tree on each share
Brian Warner [Mon, 5 Oct 2009 21:48:44 +0000 (14:48 -0700)]
Verifier: check the full block-hash-tree on each share

Removed the .todo from two test_repairer tests that check this. The only
remaining .todos are on the three crypttext-hash-tree tests.

15 years agoVerifier: check the full share-hash chain on each share
Brian Warner [Mon, 5 Oct 2009 21:34:43 +0000 (14:34 -0700)]
Verifier: check the full share-hash chain on each share

Removed the .todo from two test_repairer tests that check this.

15 years agotest_repairer: rename Verifier test cases to be more precise and less verbose
Brian Warner [Mon, 5 Oct 2009 20:11:15 +0000 (13:11 -0700)]
test_repairer: rename Verifier test cases to be more precise and less verbose

15 years agoimmutable/checker.py: rearrange code a little bit, make it easier to follow
Brian Warner [Mon, 5 Oct 2009 20:02:52 +0000 (13:02 -0700)]
immutable/checker.py: rearrange code a little bit, make it easier to follow

15 years agotest/common.py: wrap docstrings to 80cols so I can read them more easily
Brian Warner [Mon, 5 Oct 2009 20:01:43 +0000 (13:01 -0700)]
test/common.py: wrap docstrings to 80cols so I can read them more easily