Commit Graph

1092 Commits

Author SHA1 Message Date
Brian Warner
8b1e53b248 README: update/clarify the build-depends packages need to create .debs 2007-08-16 20:30:07 -07:00
Brian Warner
ceef80bee6 scripts: rearrange Options, make --version behave the same for all commands 2007-08-16 12:50:19 -07:00
Zooko O'Whielacronx
4ed7f0ac2a fix small bug in unit tests which caused spurious failures on Windows 2007-08-16 14:14:41 -07:00
Zooko O'Whielacronx
a431811011 in-line doc edit: s/pyutil/allmydata.util/ 2007-08-16 14:10:48 -07:00
Zooko O'Whielacronx
094b687d6e import version class and make-version script from pyutil -- fixes win32 build, improves error handling, and eliminates unused features 2007-08-16 14:09:30 -07:00
Zooko O'Whielacronx
6c4fb6fd93 a first crack at the "put" command-line
There are actually two versions in this patch, one of which requires twisted.web2 and the other of which uses the Python standard library's socket module.  The socketish one doesn't know when the web server is done so it hangs after doing its thing.  (Oh -- maybe I should add an HTTP header asking the web server to close the connection when finished.)  The web2ish one works better in that respect.  Neither of them handle error responses from the server very well yet.

After lunch I intend to finish the socketish one.

To try one, mv src/allmydata/scripts/tahoe_put-{socketish,web2ish}.py src/allmydata/scripts/tahoe_put.py .

If you want to try the web2ish one, and you can't find a web2 package to install, you can get one from:

http://allmydata.org/~zooko/repos/twistedweb2snarf/
2007-08-16 12:15:38 -07:00
Brian Warner
8e12cc83df Makefile: add build_ext target, for convenience 2007-08-15 17:47:10 -07:00
Brian Warner
ee6a6c79fa webish.py: allow users to delete (but not create) empty-named files. Closes #94. 2007-08-15 23:14:05 -07:00
Brian Warner
c1da0c11bc webish: implement replace= for POST commands 2007-08-15 15:21:38 -07:00
Brian Warner
1752c9e29e webish: implement replace= for PUT commands 2007-08-15 13:22:23 -07:00
Brian Warner
42dcc3088e IDirectoryNode: add has_child() method 2007-08-15 13:22:01 -07:00
Brian Warner
244471dcc4 check_memory.py: Disable the 100MB test for now: our buildslave can't currently handle it because the testnet/framework processes uses something like 600M of RSS. 2007-08-15 12:55:11 -07:00
Brian Warner
944ad6508b webapi.txt: specify replace= behavior on all PUT and POST commands 2007-08-15 19:31:49 -07:00
Brian Warner
31bfb3950a webapi.txt: clear up underspecified items, replace 'webpassword' paragraph
with a section about our expected plans for #98, add more introductory text
to the sections on manipulate-file vs manipulate-directory.
2007-08-15 19:04:47 -07:00
Zooko O'Whielacronx
4f2244bfdd webapi.txt: shorter and hopefully clearer description of names vs. identifiers
Brian (and anyone who has an interest in the API and documentation): please review.
2007-08-15 12:28:04 -07:00
Brian Warner
a0c16f1a36 client.py: make a note in the logs when the auto-shutdown feature is in use 2007-08-14 02:12:30 -07:00
Brian Warner
179d5462c0 webish: look for when_done= in POST fields as well as queryargs. Closes #101.
We need to look in the fields because that's how we build the mkdir/upload
forms. Without this, uploading or creating directories would leave us on a
page that had just a URI, instead of something actually useful to a human.
2007-08-13 17:45:02 -07:00
Brian Warner
e6195caff1 docs/configuration.txt: explain the files in the node's basedir, which ones are useful to modify, etc 2007-08-13 13:28:40 -07:00
Brian Warner
6c6c62037d fix pyflakes warnings from recent b32decode change 2007-08-12 16:33:51 -07:00
Brian Warner
0332e94656 test_system.py: add coverage for get_permuted_peers() 2007-08-12 16:29:34 -07:00
Brian Warner
1ac83637a6 Client.get_permuted_peers: use self.nodeid now that it's fixed 2007-08-12 16:24:51 -07:00
tahoe
53349c571f shorten ids 2007-08-12 11:53:18 -07:00
Zooko O'Whielacronx
42f8e57416 don't over-encode the nodeid many times with ascii-encoding 2007-08-12 10:29:38 -07:00
tahoe
6683456eaa ymy name... 2007-08-10 14:51:47 -07:00
Zooko O'Whielacronx
3bc708529f foolscap: change using-foolscap.xhtml to say "public key" instead of "private key"
In the first instance, I hope that the tubid is generated from the hash of the public key and not the hash of the private key!
In the latter instances, the phrase "public key" as in "public key certificate" is more common.
2007-08-11 09:45:03 -07:00
Brian Warner
2f5a27316f webish: localfile=/localdir= are now disabled by default, a special switch is required to enable them 2007-08-10 18:21:22 -07:00
Brian Warner
b4a0effe30 webapi.txt: separate out debug/test commands, indicate that localfile=/localdir= requires special activation 2007-08-10 18:20:22 -07:00
Brian Warner
9281a0aedc webish: reduce POST memory footprint by overriding http.Request
The original twisted.web.http.Request class has a requestReceived method
that parses the form body (in the request's .content filehandle) using
the stdlib cgi.parse_multipart() function. parse_multipart() consumes a
lot of memory when handling large file uploads, because it holds the
arguments entirely in RAM. Nevow's subclass of Request uses cgi.FieldStorage
instead, which is much more memory-efficient.

This patch uses a local subclass of Request and a modified copy of the
requestReceived method. It disables the cgi.parse_multipart parsing and
instead relies upon Nevow's use of FieldStorage. Our code must look for
form elements (which come from the body of the POST request) in req.fields,
rather than assuming that they will be copied into req.args (which now
only contains the query arguments that appear in the URL).

As a result, memory usage is no longer inflated by the size of the file
being uploaded in a POST upload request. Note that cgi.FieldStorage uses
temporary files (tempfile.TemporaryFile) to hold the data.

This closes #29.
2007-08-10 17:25:33 -07:00
Brian Warner
b6ff38e4c7 webish.POSTHandler: fix typo that meant we didn't look for 'name' in req.fields 2007-08-10 17:25:28 -07:00
Brian Warner
54b6900526 webapi.txt: minor clarifications and examples 2007-08-10 15:52:27 -07:00
Brian Warner
3d42856eb1 boringfile: ignore the setuptools .egg that ez_setup.py likes to download/build/install during compilation 2007-08-09 19:45:18 -07:00
Brian Warner
17d776fd07 Makefile: add 'upload-self' pass to check-memory 2007-08-10 01:41:34 -07:00
Brian Warner
998802fd6d #96: add flag to enable pushing data to ourselves, defaulting to False 2007-08-09 18:30:24 -07:00
Brian Warner
8b14ad1673 encode.py: log a percentage complete as well as the raw byte counts 2007-08-09 18:28:45 -07:00
Brian Warner
08ee80176a Encoder.__repr__: mention the file being encoded 2007-08-09 18:26:56 -07:00
Brian Warner
684966d103 encode.py: add a reactor turn barrier between segments, to allow Deferreds to retire and free their arguments, all in the name of reducing memory footprint 2007-08-09 18:26:17 -07:00
Zooko O'Whielacronx
c0c6417e95 webapi.txt: put back the manifest feature
So that we can compare versions of webapi.txt with and without this documentation, side by side.
2007-08-10 12:58:33 -07:00
Zooko O'Whielacronx
ba2e9aa4cb webapi.txt: put back the localfile feature
So that we can compare versions webapi.txt with and without this documentation side by side.
2007-08-10 12:52:37 -07:00
Zooko O'Whielacronx
193f603e74 webapi.txt: add URI-based GET variants 2007-08-10 12:33:29 -07:00
Zooko O'Whielacronx
89d2e1ac57 webapi.txt: some editing, and remove the localfile feature and the manifest feature
My motivation to remove these features is as per:

http://allmydata.org/pipermail/tahoe-dev/2007-August/000067.html

However, I haven't heard back from Brian yet, so I'm actually going to put them back in the next patch so that I can compare the two versions of webapi.txt side by side.
2007-08-10 12:24:13 -07:00
Zooko O'Whielacronx
887240e7a3 webapi.txt: further refactoring and add a section explaining TOCTTOU bugs and how to avoid them by using URIs 2007-08-10 12:04:30 -07:00
Zooko O'Whielacronx
e68a0e07de webapi.txt: further refactoring and editing to clarify the fact that you don't know whether a thing is a file or a directory before you fetch it 2007-08-10 10:19:27 -07:00
Zooko O'Whielacronx
8b0807812b webapi.txt: add "?t=file" flag and reorganize doc to discourage people from thinking that they know before hand the file-or-dir type of the thing that they are naming 2007-08-10 09:43:52 -07:00
Zooko O'Whielacronx
531109e803 fix test_web refactoring so that the WebMixin class isn't a TestCase
Thanks, Brian.
2007-08-10 08:40:02 -07:00
wilcoxjg
e13783cd6a If do_stop attempts to stop a nonexistent process the OSError exception is caught (by errno) and handled tersely. 2007-08-09 08:57:45 -07:00
Zooko O'Whielacronx
39f218ab90 refactor test_web so that other tests can use the part of test_web that sets up a simple filesystem 2007-08-09 13:08:42 -07:00
Brian Warner
9ac5c14037 introducer: don't log.err() an initial connection failure, since that flunks tests. Use self.log() instead. Also improve test_client.py to always trigger this case, before it was finishing to quickly to always hit the problem. 2007-08-09 12:53:44 -07:00
Brian Warner
84d41adfcc check_memory.py: include a single 100MB test 2007-08-09 11:30:33 -07:00
Brian Warner
b25446d514 munin/tahoe-storagespace.py: use /bin/du instead of our python version, since
it a) is faster and b) will include filesystem overhead that is a real cost.
2007-08-09 18:26:57 -07:00
Brian Warner
1bb44df8ba webapi.txt: update rfc reference 2007-08-09 11:24:35 -07:00