Commit Graph

4352 Commits

Author SHA1 Message Date
francois
d0c6aa569d 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
2010-01-09 09:59:46 -08:00
Zooko O'Whielacronx
eb9358ff6d 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
2010-01-09 09:49:56 -08:00
Zooko O'Whielacronx
7afccbdabc docs: CREDITS: add David-Sarah to the CREDITS file 2010-01-08 22:04:35 -08:00
Brian Warner
419a076f59 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()
2010-01-02 14:08:41 -08:00
Brian Warner
db19b62702 immutable/checker.py: oops, forgot some imports. Also hush pyflakes. 2009-12-29 15:39:09 -08:00
Brian Warner
ba0690c9d7 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.
2009-12-29 15:37:46 -08:00
Brian Warner
acd211765c node.py/interfaces.py: minor docs fixes 2009-12-29 15:04:09 -08:00
Brian Warner
830282f501 NEWS: fix 1.4.1 announcement w.r.t. add-lease behavior in older releases 2009-12-29 15:03:10 -08:00
Brian Warner
794e32738f 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.
2009-12-29 15:01:08 -08:00
Brian Warner
a50fdca6ab test_cli: verify fix for "tahoe get" not creating empty file on error (#121) 2009-12-27 18:54:44 -05:00
Brian Warner
00d0ca3902 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'
2009-12-27 18:21:49 -05:00
Brian Warner
a8a768ef9d 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'
2009-12-27 17:54:43 -05:00
Brian Warner
931ab76588 tahoe_get: don't create the output file on error. Closes #121. 2009-12-27 17:04:04 -05:00
Brian Warner
499add09e6 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).
2009-12-27 15:10:43 -05:00
Brian Warner
2e0a61a953 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.
2009-12-27 14:58:28 -05:00
Brian Warner
eff82174d5 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.
2009-12-27 11:37:03 -05:00
Brian Warner
800fc176ec misc/ringsim.py: make it deterministic, more detail about grid-is-full behavior 2009-12-26 21:48:32 -05:00
Brian Warner
aa102da804 misc/ringsim.py: tool to discuss #302 2009-12-26 01:03:39 -05:00
Zooko O'Whielacronx
47003fdc07 docs: fix helper.txt to describe new config style 2009-12-24 14:35:22 -08:00
Brian Warner
c4c9683766 docs/stats.txt: add TOC, notes about controlling gatherer's listening port
Thanks to Jody Harris for the suggestions.
2009-12-24 15:21:33 -05:00
Brian Warner
950b1d80bb Add docs/stats.py, explaining Tahoe stats, the gatherer, and the munin plugins. 2009-12-23 00:24:00 -05:00
Brian Warner
a4a6c02ef8 more #859: avoid deprecation warning for unit tests too, hush pyflakes
* factor maybe-import-sha logic into util.hashutil
2009-12-14 16:01:47 -08:00
Zooko O'Whielacronx
b69e1c600d use hashlib module if available, thus avoiding a DeprecationWarning for importing the old sha module; fixes #859 2009-12-14 13:27:03 -08:00
Zooko O'Whielacronx
c1438805ce docs: reflow architecture.txt to 78-char lines 2009-12-08 15:29:43 -08:00
Zooko O'Whielacronx
275da69ba4 docs: update the about.html a little 2009-12-08 13:27:37 -08:00
Zooko O'Whielacronx
95296e01a3 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.
2009-11-13 08:30:33 -08:00
Brian Warner
47cba4b51a mutable/retrieve.py: stop reaching into private MutableFileNode attributes 2009-12-08 09:29:21 -08:00
Brian Warner
aa3caf812d mutable/servermap.py: stop reaching into private MutableFileNode attributes 2009-12-08 09:26:08 -08:00
Brian Warner
eb18686284 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
2009-12-08 09:11:56 -08:00
Brian Warner
696cc000d0 control.py: fix speedtest: use download_best_version (not read) on mutable nodes 2009-12-06 22:05:12 -08:00
Brian Warner
a6e25d0d2c FTP-and-SFTP.txt: fix ssh-keygen pointer 2009-12-06 21:28:03 -08:00
Zooko O'Whielacronx
4706859967 setup: ignore _darcs in the "test-clean" test and make the "clean" step remove all .egg's in the root dir 2009-12-06 10:48:35 -08:00
Brian Warner
a980ea337b remove MutableFileNode.download(), prefer download_best_version() instead 2009-12-01 17:54:38 -05:00
Brian Warner
96834da0a2 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.
2009-12-01 17:53:30 -05:00
Brian Warner
1059db51f2 server.py: undo my bogus 'correction' of David-Sarah's comment fix
and move it to a better line
2009-11-30 21:46:07 -05:00
Brian Warner
74974b27fe Implement more coherent behavior when copying with dircaps/filecaps (closes #761). Patch by Kevan Carstensen. 2009-11-30 13:10:09 -08:00
Brian Warner
91e7cb484b storage.py: update comment 2009-11-30 11:59:13 -08:00
david-sarah
ef002c935a storage server: detect disk space usage on Windows too (fixes #637) 2009-11-20 21:56:44 -08:00
david-sarah
c4d38ad4c5 make status of finished operations consistently "Finished" 2009-11-20 22:15:43 -08:00
Brian Warner
79e7e0d8e3 NEWS: update with all user-visible changes since the last release 2009-11-27 17:42:17 -05:00
Brian Warner
31c9cb760a update "tahoe backup" docs, and webapi.txt's mkdir-with-children 2009-11-27 00:59:00 -05:00
Brian Warner
9901a08fd3 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
2009-11-26 15:42:57 -08:00
Brian Warner
366a309795 webapi: fix t=check for DIR2-LIT (i.e. empty immutable directories) 2009-11-26 15:27:31 -08:00
Brian Warner
41bcc9f39e PipelineError: fix str() on python2.4 . Closes #842. 2009-11-24 13:25:12 -08:00
Brian Warner
d918ab407e test_uri.py: s/NewDirnode/Dirnode/ , now that they aren't "new" anymore 2009-11-19 23:55:53 -08:00
Brian Warner
0cf320c2ab 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.
2009-11-19 23:52:55 -08:00
Brian Warner
d2badbea78 class name cleanups: s/FileNode/ImmutableFileNode/
also fix test/bench_dirnode.py for recent dirnode changes
2009-11-19 23:22:39 -08:00
Brian Warner
6e7fb1006d Use DIR-IMM and t=mkdir-immutable for "tahoe backup", for #828 2009-11-18 11:28:13 -08:00
Brian Warner
834b20210a web/directory.py: use "DIR-IMM" to describe immutable directories, not DIR-RO 2009-11-18 11:18:32 -08:00
Brian Warner
e5452290f7 web/info.py: hush pyflakes 2009-11-18 11:17:36 -08:00