Commit Graph

1025 Commits

Author SHA1 Message Date
Zooko O'Whielacronx
ab4303609d cmdline: give useful error messages about the --dir-uri and ~/.tahoe/private/root_dir.cap 2008-01-03 17:35:35 -07:00
Zooko O'Whielacronx
23961448da a few formatting tidy-ups 2008-01-03 17:14:19 -07:00
Brian Warner
acfb11d26f test_client.py: validate more versioning code 2008-01-03 14:38:24 -07:00
Brian Warner
6a2e5d4aea test_client.py: assert allmydata.__version__ is not unknown 2008-01-03 14:34:59 -07:00
Zooko O'Whielacronx
5995d11a3c remove automatic private dir
* rename my_private_dir.cap to root_dir.cap
 * move it into the private subdir
 * change the cmdline argument "--root-uri=[private]" to "--dir-uri=[root]"
2008-01-03 17:02:05 -07:00
Zooko O'Whielacronx
eb373c0001 add human-encodings of caps, refactor encodings of caps, tighten checks, fix unit tests to use values of the right size 2008-01-03 16:55:43 -07:00
Zooko O'Whielacronx
46db7cf1dc add regexes to idlib to match certain kinds of base32-encoded values 2008-01-03 16:44:46 -07:00
Zooko O'Whielacronx
c066903566 fix idlib.could_be_base32_encoded_l() to accept *only* valid strings 2008-01-03 11:43:11 -07:00
Zooko O'Whielacronx
eae499539d refactor constructing URI objects from strings and add human-encoding of WriteableSSKFileURI 2008-01-02 22:12:15 -07:00
Brian Warner
6b81ebfd8e refactor webish.py slightly, improve the test coverage a bit. One test is marked SKIP pending improvements in webish.py 2007-12-25 03:48:57 -07:00
Brian Warner
fae5de8d0d test_web.py: fix pyflakes error 2007-12-25 01:56:04 -07:00
Brian Warner
0e804da8d9 webish: use get_args() everywhere, put .fields=None in MyRequest 2007-12-25 00:07:04 -07:00
Brian Warner
4ba1af37a6 test_web: more coverage of URIPOSTHandler error cases 2007-12-24 22:49:35 -07:00
Brian Warner
7d311b8dd7 test_web: test POST_upload_no_link against /uri, not /uri/ 2007-12-24 17:55:38 -07:00
Brian Warner
ae760b3ee4 test_web.py: use /uri?t=mkdir instead of /uri/?t=mkdir, and confirm that the redirection target is correct 2007-12-24 17:46:52 -07:00
Brian Warner
47761bde93 webish: factor out queryargs-or-formargs extraction, make /uri?t=mkdir work and redirect to a valid url 2007-12-24 17:26:52 -07:00
Brian Warner
4ce196a9c4 node.py: remove the provoke-logport-furlfile-creation hack now that foolscap-0.2.3 does it for us, and add bridge-twisted-logs 2007-12-24 17:24:40 -07:00
Zooko O'Whielacronx
5e8e2faf5d setup: update doc in __init__.py 2007-12-22 10:46:50 -07:00
Zooko O'Whielacronx
1ac11301a7 setup: finish switching from Tahoe's versions of autoversioning tools to pyutil's versions 2007-12-21 14:42:38 -07:00
Zooko O'Whielacronx
a85a4d71f7 webish: add button to make directories and unit test of it
Unfortunately although it passes the unit tests, it doesn't work, because the unit tests and the implementation use the "encode params into URL" technique but the button uses the "encode params into request body" technique.
2007-12-20 15:31:12 -07:00
Zooko O'Whielacronx
a7361179aa make the unit test of the overwrite button more general 2007-12-20 15:23:07 -07:00
Zooko O'Whielacronx
a4bc623fa5 make the wapi/wui [*] support creation of a new directory without there already being an existing directory to link the new one into
[*] WebAPI/WebUI
2007-12-20 12:58:17 -07:00
Brian Warner
d4283ac1ec mutable: always include ourselves in the querylist when Publishing, because 0.7.0 usually stores our root dirnode only on ourselves, and our nodeid might not appear in the first N+epsilon peers 2007-12-19 00:06:53 -07:00
Brian Warner
fc3574a654 mutable.py: one more logging fix 2007-12-18 23:42:41 -07:00
Brian Warner
22f9e8c55b mutable.py: oops, our logging wrappers can't take posargs yet 2007-12-18 23:36:16 -07:00
Brian Warner
c00b88025d mutable.Publish: improve logging 2007-12-18 23:30:50 -07:00
Brian Warner
9a8f68c41f dirnode: add set_uris() and set_nodes() (plural), to set multiple children at once. Use it to set up a new webapi test for issue #237. 2007-12-18 23:30:02 -07:00
Brian Warner
2308420fc6 node: provoke foolscap-0.2.2 into saving logport.furl, so we can attach to it with 'flogtool dump'. Also, place it in private/, since logs are considered somewhat private 2007-12-18 23:27:02 -07:00
Zooko O'Whielacronx
05b04d2b90 fix representation of node ids in PeerTracker objects 2007-12-19 17:55:28 -07:00
Zooko O'Whielacronx
a0d73f8afb remove some no-longer needed replacements of "/" with "!" in uris 2007-12-19 17:54:40 -07:00
Brian Warner
2db158dd52 more new-pyflakes warnings fixed 2007-12-18 18:51:33 -07:00
Brian Warner
50bc0d2fb3 the new pyflakes is stricter, complaining about function definitions that overshadow earlier definitions or imports. Fix some of its complaints. 2007-12-18 18:47:28 -07:00
Brian Warner
318b63fbc7 hush pyflakes 2007-12-18 18:37:22 -07:00
Brian Warner
7fb37209ee create_node.py: need to create private/ dir in create-client so we can touch the my_private_dir.cap file 2007-12-18 15:42:18 -07:00
Brian Warner
60d6728ab3 oops, touch private/my_private_dir.cap when creating the client 2007-12-18 15:36:59 -07:00
Brian Warner
01a93dfe8f check_load: add stats-gathering 2007-12-18 14:07:37 -07:00
Brian Warner
50840b1085 add a simple load-generating tool to do random reads and writes 2007-12-17 21:06:07 -07:00
Brian Warner
b8d77fbb46 move my_private_dir.cap into private/ 2007-12-17 20:57:40 -07:00
Brian Warner
a592551ccf my_private_dir.cap: add newline for readability, open with mode 'w' not 'w+' since we don't need to read from this filehandle 2007-12-17 20:48:48 -07:00
Brian Warner
8b9f86fb17 remove the slash-to-bang conversion from CLI tools and webapi.txt 2007-12-17 20:22:26 -07:00
Zooko O'Whielacronx
2a7f374e45 unit test that POST /uri/?t=mkdir works 2007-12-18 17:47:49 -07:00
Zooko O'Whielacronx
a5a54ac5ca remove the DirnodeURI foolscap schema and mv those regexes into uri.py
We currently do not pass dirnode uris over foolscap.
2007-12-18 17:44:24 -07:00
Zooko O'Whielacronx
9848d2043d make more precise regexp for WriteableSSKFileURI and DirnodeURI and use it in unit tests
Also allow an optional leading "http://127.0.0.1:8123/uri/".
Also fix a few unit tests to generate bogus Dirnode URIs of the modern form instead of the former form.
2007-12-18 13:15:08 -07:00
Zooko O'Whielacronx
ea43753386 fix unit tests to assert that we do *not* link to start.html when there is no private dir, instead of asserting that we *do* 2007-12-17 18:51:16 -07:00
Zooko O'Whielacronx
36e8e4e561 do not put a link from the welcoXme page to the start.html if there is not a private directory 2007-12-17 18:35:59 -07:00
Zooko O'Whielacronx
a983f6d60c rename "my_private_dir.uri" to "my_private_dir.cap" 2007-12-17 18:35:25 -07:00
Zooko O'Whielacronx
08a64c3a2b rename "secret" to "lease_secret" and change its size from 16 to 32 bytes 2007-12-17 18:34:11 -07:00
Zooko O'Whielacronx
8c65bdcf9d put all private state in $BASEDIR/private
fixes #219

The only part of #219 that this doesn't include is the part about 
logpublisher, which has been moved out of tahoe into foolscap.
2007-12-17 16:39:54 -07:00
Zooko O'Whielacronx
d3f23d4052 we no longer need to replace "/" with "!" in urls 2007-12-14 18:25:50 -07:00
Zooko O'Whielacronx
20f549baa1 tidy-up some comments and logging messages 2007-12-14 18:24:46 -07:00
Zooko O'Whielacronx
ae90016845 fix the overwrite button and add unit test for it 2007-12-14 17:52:05 -07:00
Brian Warner
cd59cded91 test_system.py: oops, match change in RIControl 2007-12-14 03:08:16 -07:00
Brian Warner
7924f5ac21 test_web.py: cosmetic, remove leftover trailing space 2007-12-14 02:06:09 -07:00
Brian Warner
f6b2072af1 check-speed: test SSK upload/download speed too. SDMF imposes a limit on the file sizes, no 10MB or 100MB test 2007-12-14 02:05:31 -07:00
Brian Warner
69b65b6b01 remove logpublisher, use the Foolscap version now that this functionality has been moved into Foolscap-0.2.2 2007-12-12 20:31:01 -07:00
Brian Warner
e52e14cc66 remove tests of logging functionality that's been subsumed by foolscap logging 2007-12-12 20:23:53 -07:00
Zooko O'Whielacronx
2915f5b7f4 remove unimplemented and skipped test for feature that we don't plan to implement any time soon (XML-RPC interface) 2007-12-12 20:06:05 -07:00
Zooko O'Whielacronx
0949638c11 remove unused import: thanks, pyflakes 2007-12-12 20:05:30 -07:00
Zooko O'Whielacronx
caa69b007e refactor the feature of getting versions of packages, include the version numbers of more of the packages that we use 2007-12-12 19:37:37 -07:00
Zooko O'Whielacronx
1ac09840a4 a few documentation and naming convention updates
Notable: the argument to make REPORTER has been renamed to TRIALARGS.
2007-12-12 19:34:08 -07:00
Zooko O'Whielacronx
a7f954ac06 editing: change names like "MyThing" to "FakeThing" for fake objects in unit tests 2007-12-11 18:10:29 -07:00
Zooko O'Whielacronx
38d1af7ede fix unit test to pass forward-slashes to the CLI since it demands that the CLI emit forward-slashes 2007-12-11 20:03:44 -07:00
Brian Warner
2cb05817a6 test_web.py: survive localdir/localfile= names with spaces. Should close #223 2007-12-11 19:47:04 -07:00
Brian Warner
b085097adc test_system: write test data in 'b' verbatim mode, since on windows the default text-mode is different. Addresses one of the failures in #223 2007-12-11 19:16:33 -07:00
Brian Warner
74820cc3de webish: append save=true to a GET URL to save-to-disk. Closes #222. 2007-12-11 18:04:44 -07:00
Zooko O'Whielacronx
995cece54a fix import error, detected thanks to "make test" 2007-12-11 17:23:01 -07:00
Zooko O'Whielacronx
5c3c1fea9a fix missing import, thanks to pyflakes 2007-12-11 17:00:29 -07:00
Zooko O'Whielacronx
4210ba2b8a fix test_introducer to wait for the right things in order to avoid intermittent test failures 2007-12-11 14:08:15 -07:00
Zooko O'Whielacronx
40edccf9c5 fix IntroducerClient.when_enough_peers()
add IntroducerClient.when_few_enough_peers(), fix and improve test_introducer
2007-12-10 20:22:59 -07:00
Brian Warner
406ff52cf9 control.py: hush pyflakes warning 2007-12-06 18:38:42 -07:00
Brian Warner
0dc84963f1 the wait_for_numpeers= argument to client.upload() is optional: make both the code and the Interface reflect this 2007-12-06 18:36:58 -07:00
Zooko O'Whielacronx
192477e4a2 move increase_rlimits() into iputil and make it a no-op on Windows 2007-12-07 08:03:43 -07:00
Zooko O'Whielacronx
9a30ab2dfd make check-memory use the new POST /uri?t=upload 2007-12-06 17:28:23 -07:00
Zooko O'Whielacronx
4923d8dcb5 make control.get_memory_usage() return all zeroes if reading /proc/mem/whatsit raises an exception 2007-12-06 17:27:40 -07:00
Zooko O'Whielacronx
8ad2e85fdf add POST /uri?t=upload and tests thereof
Hm...  I refactored processing of segments in a way that I marked as "XXX HELP
I AM YUCKY", and then I ran out of time for rerefactoring it before I
committed.  At least all the tests pass.
2007-12-06 17:17:02 -07:00
Brian Warner
841c1a8509 storage.py: factor out a common compare() routine 2007-12-05 00:20:34 -07:00
Brian Warner
51af1fa2e3 webish: fix overwrite form display 2007-12-05 00:15:13 -07:00
Brian Warner
53e865cf49 test_web.py: add coverage for directory listings that include mutable files 2007-12-04 23:57:40 -07:00
Brian Warner
785f21b9bf test_web.py: add coverage for POST t=check 2007-12-04 23:49:38 -07:00
Brian Warner
56e02b274b webish: add POST t=mutable, make it replace files in-place, add t=overwrite 2007-12-04 23:42:54 -07:00
Brian Warner
4c79b4cd07 test_web.py: remove last use of fake_* methods, remove dead code 2007-12-04 23:11:00 -07:00
Brian Warner
f190382d5e refactor web tests, and interfaces.IFileNode 2007-12-04 23:01:37 -07:00
Brian Warner
4b8c2e93b3 checker: improve test coverage a little bit 2007-12-04 18:00:12 -07:00
Brian Warner
bf1b7d78e2 uri.py: improve test coverage 2007-12-04 17:38:31 -07:00
Brian Warner
cf2bd03813 remove most (maybe all?) traces of old Dirnode class. Yay for negative code days. 2007-12-04 17:00:58 -07:00
Brian Warner
1a5257c388 improve test coverage on FileNode.check 2007-12-04 15:55:27 -07:00
Brian Warner
0f5ef5184d test_dirnode.py: obtain full coverage of dirnode.py 2007-12-04 14:32:04 -07:00
Brian Warner
cca166a4f5 rename dirnode2.py to dirnode.py 2007-12-04 11:45:20 -07:00
Brian Warner
b780127f49 test_mutable: improve test coverage a bit, add test_filenode.py 2007-12-03 21:37:54 -07:00
Brian Warner
955bd5383d remove PyCrypto, now we only use pycrypto++ 2007-12-03 18:10:01 -07:00
Brian Warner
0bf5a762a9 use AES from pycryptopp instead of pycrypto, also truncate the keys slightly differently 2007-12-03 17:27:46 -07:00
Brian Warner
87e6ccbd4a remove leftover defer.setDebugging(), to speed up tests from 200s to 83s 2007-12-03 17:10:02 -07:00
Zooko O'Whielacronx
3605354a95 fix several bugs and warnings -- thanks, pyflakes 2007-12-03 15:42:35 -07:00
Zooko O'Whielacronx
184351d1f7 merge patch to integrate decentralized directories with "introducer_and_vdrive.py: use logpublisher too" 2007-12-03 15:29:04 -07:00
Brian Warner
d3e782a226 introducer_and_vdrive.py: use logpublisher too 2007-11-20 14:22:26 -07:00
Brian Warner
1f91e856ef encode.py: trivial whitespace change 2007-11-19 23:00:29 -07:00
Zooko O'Whielacronx
e28d7c580c merge patch to integrate decentralized directories with patch "download: use hierarchical logging" 2007-12-03 15:27:21 -07:00
Brian Warner
33a5f8ba6b more hierarchical logging: download/upload/encode 2007-11-19 19:33:41 -07:00
Brian Warner
869b690378 download: use hierarchical logging 2007-11-19 19:07:10 -07:00
Brian Warner
3d046d6ac7 logging: only test log.err when Twisted is new enough to let us ignore the generated errors 2007-11-19 18:37:00 -07:00
Zooko O'Whielacronx
2c58d3399c merge patch to integrate decentralized directories with patch to "only test log.err when Twisted is new enough to let us ignore the generated errors" 2007-12-03 15:25:14 -07:00
Brian Warner
cc1612aee5 hierarchical logging: add numbered messages and parent= args 2007-11-19 18:23:18 -07:00
Brian Warner
ce0609d29b test_client: stall 2.0s between shutdown and restart, trying to fix cygwin 2007-11-18 20:41:26 -07:00
Brian Warner
5e4b63e981 logpublisher: hush pyflakes warning 2007-11-16 20:14:46 -07:00
Brian Warner
b29ce1c30a logpublisher: implement subscribe/publish for log, add a sample client 2007-11-16 20:07:50 -07:00
Brian Warner
c2765bd8c6 mutable: fix control flow to allow good+bad shares from a peer. Fixes #211. 2007-11-16 17:12:33 -07:00
Brian Warner
2fc5247996 node.py: try to fix rlimit-setting again 2007-11-16 16:12:38 -07:00
Brian Warner
0900f328b7 node.py: try rlimit fix again 2007-11-15 23:09:02 -07:00
Brian Warner
d5c0a85c68 node.py: try to fix RLIMIT_NOFILE on solaris too 2007-11-15 23:06:44 -07:00
Brian Warner
c6df66d736 node.py: raise RLIMIT_NOFILE on bsd/cygwin to more than 256 2007-11-15 22:53:55 -07:00
Brian Warner
8a2736480a test_mutable: workaround: use more peers to avoid random test failures.
The underlying issue is recorded in #211: one corrupt share in a query
response will cause us to ignore the remaining shares in that response, even
if they are good. In our tests (with N=10 but only 5 peers), this can leave
us with too few shares to recover the file.

The temporary workaround is to use 10 peers, to make sure we never get
multiple shares per response. The real fix will be to fix the control flow.

This fixes #209.
2007-11-15 14:55:00 -07:00
Brian Warner
8742f2806d mutable: add more logging to retrieval process 2007-11-15 14:22:56 -07:00
Brian Warner
3dfe8783cb provisioning: add more options for num-servers and server-dBA 2007-11-15 13:40:49 -07:00
Brian Warner
e3037a7541 mutable: validate share_hash_chain for each inbound share 2007-11-14 15:26:46 -07:00
Zooko O'Whielacronx
8fee58fcba merge patch to integrate decentralized directories with patch to handle bad hashes 2007-12-03 15:21:14 -07:00
Brian Warner
d6f2dbbac7 mutable: handle bad hashes, improve test coverage, rearrange slightly to facilitate these 2007-11-13 23:08:15 -07:00
Zooko O'Whielacronx
59d6c3c822 decentralized directories: integration and testing
* use new decentralized directories everywhere instead of old centralized directories
 * provide UI to them through the web server
 * provide UI to them through the CLI
 * update unit tests to simulate decentralized mutable directories in order to test other components that rely on them
 * remove the notion of a "vdrive server" and a client thereof
 * remove the notion of a "public vdrive", which was a directory that was centrally published/subscribed automatically by the tahoe node (you can accomplish this manually by making a directory and posting the URL to it on your web site, for example)
 * add a notion of "wait_for_numpeers" when you need to publish data to peers, which is how many peers should be attached before you start.  The default is 1.
 * add __repr__ for filesystem nodes (note: these reprs contain a few bits of the secret key!)
 * fix a few bugs where we used to equate "mutable" with "not read-only".  Nowadays all directories are mutable, but some might be read-only (to you).
 * fix a few bugs where code wasn't aware of the new general-purpose metadata dict the comes with each filesystem edge
 * sundry fixes to unit tests to adjust to the new directories, e.g. don't assume that every share on disk belongs to a chk file.
2007-12-03 14:52:42 -07:00
Zooko O'Whielacronx
7b24eebd0a unit tests: bump up a timeout which I encountered when running on a very slow machine 2007-11-29 14:47:35 -07:00
Zooko O'Whielacronx
a50cea61bd remove tahoe_put-web2ish.py
It isn't currently used, and I don't remember what part of its behavior was so much better than tahoe_put.py, and Brian has subsequently improved tahoe_put.py.
2007-11-19 14:07:28 -07:00
Zooko O'Whielacronx
ae727a550a IMutableFileNode is a subtype of IFileNode
I'm not 100% sure that this is correct, but it looks reasonable, it passes unit
tests (although note that unit tests are currently not covering the new mutable
files very well), and it makes the "view JSON" link on a directory work instead
of raising an assertion error.
2007-11-10 16:37:18 -07:00
Zooko O'Whielacronx
35aea346d3 don't provide the "overwrite" button if the file is readonly to you 2007-11-10 16:07:05 -07:00
Zooko O'Whielacronx
85b972a4c3 WUI: hook up an "overwrite" button on mutable files 2007-11-10 10:53:45 -07:00
Zooko O'Whielacronx
97de6a03d2 remove parts of pycrypto that we are no longer going to use: SHA256 and RSA 2007-11-09 18:21:12 -07:00
Zooko O'Whielacronx
f6451deb74 mutable.py: fix padding/shape-of-input-data to zfec 2007-11-09 18:06:25 -07:00
Zooko O'Whielacronx
3c7f96400d hashutil.py: switch from pycrypto to pycryptopp SHA256 2007-11-09 14:40:13 -07:00
Brian Warner
1f22768dc7 webish: add preliminary mutable file support: upload, download, listings, JSON, URI, RO-URI. No replace yet. 2007-11-09 03:54:27 -07:00
Brian Warner
63233ecf37 consolidate dirnode/filenode-creation code into Client 2007-11-09 02:54:51 -07:00
Brian Warner
61d9ab7690 mutable: cheap padding hack to make zfec tolerate short files 2007-11-08 04:30:37 -07:00
Brian Warner
30a91c84c8 mutable: verify incoming share signatures during Publish, it's not that expensive and it's a good idea 2007-11-08 14:02:36 -07:00
Brian Warner
a4606d6560 test_system: RSA keys are even more variable than I thought, 2044..2049 2007-11-08 05:04:11 -07:00
Brian Warner
2eaa4195cf mutable: add basic test coverage of new-dirnodes-using-mutable-files 2007-11-08 04:31:00 -07:00
Brian Warner
c538e2b020 mutable: fix multiple-versions-interfering-with-each-other bug. replace() tests now pass. 2007-11-08 04:07:33 -07:00
Brian Warner
0ad7ff48fa test_system: RSA keys vary in size, expand valid ranges in test 2007-11-08 03:01:13 -07:00
Brian Warner
e7ad7f8791 mutable: grab encprivkey when necessary during publish, fix test_mutable 2007-11-08 02:46:27 -07:00
Brian Warner
09fd2dfb3a mutable: rearrange order of Publish to allow replace() to work. Doesn't work yet. Also test_mutable is disabled for a while. 2007-11-07 21:01:39 -07:00
Brian Warner
247bfe8d58 mutable: fix usage of NeedMoreDataError 2007-11-07 17:52:09 -07:00
Brian Warner
c783128012 mutable: wire in RSA for real, using pycryptopp 2007-11-07 17:51:35 -07:00
Brian Warner
30e7ca06f5 mutable: make error handling more robust 2007-11-07 17:45:45 -07:00
Zooko O'Whielacronx
f60dc4adfb UNDO: hashutil: replace pycrypto's SHA256 with pycryptopp's SHA256 2007-11-07 18:02:39 -07:00
Zooko O'Whielacronx
11412da436 hashutil: replace pycrypto's SHA256 with pycryptopp's SHA256 2007-11-07 18:02:39 -07:00
Brian Warner
be94960680 mutable: test roundtrip, make it work 2007-11-07 14:19:01 -07:00
Brian Warner
ba43c033fa storage.py: add a little logging (disabled) 2007-11-07 14:14:54 -07:00
Zooko O'Whielacronx
3c222bbe26 setup: print out the version number of pycryptopp in "tahoe --version" 2007-11-07 10:11:56 -07:00
Brian Warner
a46e64b0bb test_system.mutable: make sure we exercise FEC padding 2007-11-06 19:50:33 -07:00
Brian Warner
cc5d35cc07 dump-share: emit SDMF information too 2007-11-06 19:46:31 -07:00
Brian Warner
fdbe692810 add container_size to mutable dump-share output 2007-11-06 19:31:22 -07:00
Brian Warner
8be9ef5149 mutable: stub out pubkey creation until we wire in pycryptopp properly 2007-11-06 19:27:06 -07:00
Brian Warner
ddf4d23bef test_system.mutable: add test coverage for the 'dump-share' debug command 2007-11-06 19:10:49 -07:00
Brian Warner
bc8605ad39 test_system: add early test for mutable slots, currently publish-only 2007-11-06 18:57:11 -07:00
Brian Warner
530085df4a test_mutable: remove dead code 2007-11-06 18:56:39 -07:00