Commit Graph

2743 Commits

Author SHA1 Message Date
Zooko O'Whielacronx
3b2d0d9609 setup: run require_auto_deps() before attempting to import any deps in __init__.py
For one thing, this makes missing-dependency failures into DistributionNotFound errors instead of ImportErrors, which might be more useful to the user. For another thing, if someone is using distributions that were installed with --multi-version, then they might be not importable until after require_auto_deps() has been run. (The docs claim that this would be the case, but we don't have an example of this happening at this time.)
2010-10-30 01:10:35 -07:00
david-sarah
1950d5a719 scripts/runner.py: fix unused import of allmydata. refs #1190 2010-10-29 17:31:49 -07:00
david-sarah
2a8f700026 scripts/runner.py: remove pkg_resources.require() calls. These are at best redundant because we have already called _auto_deps.require_auto_deps() (from allmydata.__init__) at that point, and they are causing failure of the test-from-prefixdir step on some buildslaves. refs #1190 2010-10-29 16:53:28 -07:00
david-sarah
10a5f23df9 test_runner.py: fix error in BinTahoe.test_version_no_noise introduced by last patch. refs #1235 2010-10-29 15:11:23 -07:00
david-sarah
d249589667 test_runner.py: also allow 'from pkg_resources import load_entry_point' as noise. refs #1235. 2010-10-29 13:42:46 -07:00
david-sarah
8c95f88b4f test_runner.py: if the only noise is 'UserWarning: Unbuilt egg for setuptools', skip instead of failing the no_noise tests. This version avoids 'any' to be compatible with Python < 2.5. refs #1235. 2010-10-29 12:18:04 -07:00
david-sarah
4061258c85 make ResponseCache smarter to avoid memory leaks: don't record timestamps, use DataSpans to merge entries, and clear the cache when we see a new seqnum. refs #1045, #1229 2010-10-26 21:33:02 -07:00
david-sarah
25d8103dde windows/fixups.py: limit length of string passed in a single call to WriteConsoleW. fixes #1232. 2010-10-26 19:16:36 -07:00
Brian Warner
c88eb097d9 scripts/tahoe_backup.py: oops, fix missing import, thanks pyflakes
test_cli.py: hush minor pyflakes complaint
2010-10-29 02:42:23 -07:00
Brian Warner
d61d41147c mutable/servermap.py: update comment. Closes #1231. 2010-10-29 02:14:24 -07:00
Francois Deppierraz
14ee763c54 tahoe_cp.py: Don't call urllib.quote with an Unicode argument, fix #1224
tahoe_backup.py: Fix another (potential) occurrence of calling urllib.quote()
with an Unicode parameter
2010-10-29 01:45:20 -07:00
Brian Warner
c18953c169 fix #1223, crash+inefficiency during repair due to read overrun
* repairer (really the uploader) reads beyond end of input file (Uploadable)
* new-downloader does not tolerate overreads
* uploader does lots of tiny reads (inefficient)

This fixes the last two. The uploader still does a single overread at the end
of the input file, but now that's ok so we can leave it in place. The
uploader now expects the Uploadable to behave like a normal disk
file (reading beyond EOF will return less data than was asked for), and now
the new-downloadable behaves that way.
2010-10-29 01:20:36 -07:00
david-sarah
270322ad47 startstop_node.py: pyflakes import fix. refs #1190 2010-10-27 18:48:05 -07:00
Brian Warner
ac3b26ecf2 'tahoe start': use import+call rather than find+spawn
This removes the need to use a locally-built (dependency) bin/twistd, and
removes a big chunk of behavior differences between unix and windows. It
also happens to resolve the "client node probably started" uncertainty.
Might help with #1190, #602, and #71.
2010-10-26 23:13:42 -07:00
david-sarah
59e80b2ec9 test_mutable.py: add test for ResponseCache memory leak. refs #1045, #1129 2010-10-24 12:34:09 -07:00
david-sarah
daf2b8314a test_encodingutil.py: test_argv_to_unicode modified the wrong encoding variable. fixes #1214 2010-10-22 20:58:10 -07:00
Zooko O'Whielacronx
0c2397523b doc: add explanation of the motivation for the surprising and awkward API to erasure coding 2010-10-14 23:02:02 -07:00
Zooko O'Whielacronx
98ffbfb31f setup: add --multi-version to the "setup.py develop" command-line
fixes #530. I earlier tried this twice (see #530 for history) and then twice rolled it back due to some problems that arose. However, I didn't write down what the problems were in enough detail on the ticket that I can tell today whether those problems are still issues, so here goes the third attempt. (I did write down on the ticket that it would not create site.py or .pth files in the target directory with --multi-version mode, but I didn't explain why *that* was a problem.)
2010-10-05 11:23:50 -07:00
Zooko O'Whielacronx
0c6bb0178b setup: use execfile to access _auto_deps.py in its proper location of src/allmydata/ instead of copying it into place when setup.py is executed 2010-09-05 22:57:14 -07:00
Zooko O'Whielacronx
e6a380241a trivial: M-x whitespace-cleanup 2010-09-03 07:47:12 -07:00
Zooko O'Whielacronx
cb83f2e41c minor: remove unused interface declaration, change allmydata.org to tahoe-lafs.org in email address, fix wording in relnotes.txt 2010-09-30 08:37:08 -07:00
Kevan Carstensen
ec4f87a98c immutable/repairer.py: don't use the default happiness setting when repairing 2010-09-27 13:01:02 -07:00
david-sarah
6c4ba62c5d test_download.py: simplify and possibly fix test_lost_servers; refs #1197 2010-09-11 17:32:51 -07:00
david-sarah
b23a7fcc10 test_runner.py: fix spurious failures of test_path on case-insensitive filesystems, and restore the check that the version is not 'unknown'. 2010-09-11 15:19:13 -07:00
Zooko O'Whielacronx
fd17d63c95 test: make tests stop relying on pyutil version class accepting the string 'unknown' for its version, and make them forward-compatible with the future Python Rational Version Numbering standard 2010-09-10 08:41:35 -07:00
Brian Warner
0475bd8e27 immutable download: have the finder inform its share consumer "no more shares" in a subsequent tick, thus avoiding accidentally telling it "no more shares" now and then telling it "here's another share" in a subsequent tick
fixes #1191
Patch by Brian. This patch description was actually written by Zooko, but I forged Brian's name on the "author" field so that he would get credit for this patch in revision control history.
2010-09-09 21:30:38 -07:00
Zooko O'Whielacronx
56a3258ff7 immutable downloader: add a test specifically of whether the finder sometimes announces "no more shares ever" and then announces a newly found share
(The current code fails this test, ref #1191.)
2010-09-08 21:16:54 -07:00
Zooko O'Whielacronx
9d421cb022 tests: assign the storage servers to a fixed order which triggers a bug in new downloader every time this test is run (formerly this test would detect the bug in new-downloader only sporadically)
If you are investigating the bug in new-downloader, one way to investigate might be to change this ordering to a different fixed order (e.g. rotate by 4 instead of rotate by 5) and observe how the behavior of new-downloader differs in that case.
2010-09-03 21:15:15 -07:00
Zooko O'Whielacronx
63fb687a44 download status: fix bug from me committing the wrong one of François's #1172 patches, fixes #1172 2010-09-02 09:15:41 -07:00
francois
485bfc0fd6 DownloadStatus: show active immutable downloads in Active Operations, Fix #1172 2010-09-02 03:17:28 -07:00
Zooko O'Whielacronx
cdc625e0f8 tests: bump up the allowed number of reads
Kyle's OpenBSD buildslave used 41 reads when doing this test. The fact that I'm blindly bumping this number up to match the observed behavior probably means this isn't a good criterion to be testing for anyway. But perhaps someone else (Brian) could investigate why that run on Kyle's OpenBSD box took four more reads than we expected, and whether the fact that it took 41 reads to do this operation is indicative of an actual problem.
2010-09-01 22:38:01 -07:00
Brian Warner
00e9e4e676 SegmentFetcher: use new diversity-seeking share-selection algorithm, and
deliver all shares at once instead of feeding them out one-at-a-time.

Also fix distribution of real-number-of-segments information: now all
CommonShares (not just the ones used for the first segment) get a
correctly-sized hashtree. Previously, the late ones might not, which would
make them crash and get dropped (causing the download to fail if the initial
set were insufficient, perhaps because one of their servers went away).

Update tests, add some TODO notes, improve variable names and comments.
Improve logging: add logparents, set more appropriate levels.
2010-08-31 18:37:02 -07:00
Brian Warner
c89a464510 Share: drop received data after each block finishes. Quick fix for the #1170 spans.py complexity bug. 2010-08-31 18:35:58 -07:00
francois
f026927f86 web: refactor rate computation, fixes #1166 2010-08-15 07:19:33 -07:00
Brian Warner
a3cf3331d2 DownloadStatus: put real numbers in progress/status rows, not placeholders.
Improve tests.
2010-08-09 23:06:03 -07:00
Brian Warner
dc1afc81bb web download-status: tolerate DYHBs that haven't retired yet. Fixes #1160.
Also add a better unit test for it.
2010-08-09 15:51:00 -07:00
Brian Warner
5267fc17fe immutable/filenode.py: put off DownloadStatus creation until first read() call
This avoids spamming the "recent uploads and downloads" /status page from
FileNode instances that were created for a directory read but which nobody is
ever going to read from. I also cleaned up the way DownloadStatus instances
are made to only ever do it in the CiphertextFileNode, not in the
higher-level plaintext FileNode. Also fixed DownloadStatus handling of read
size, thanks to David-Sarah for the catch.
2010-08-09 15:50:55 -07:00
Brian Warner
ed821d1504 Share: hush log entries in the main loop() after the fetch has been completed. 2010-08-09 13:43:59 -07:00
david-sarah
fd9a2205de test_runner.py: correct and simplify normalization of package directory for case-insensitive filesystems. 2010-08-08 11:50:05 -07:00
david-sarah
f88e4f0df6 test_runner.py: make test_path work for test-from-installdir. 2010-08-08 10:13:40 -07:00
david-sarah
f5bf900d64 src/allmydata/__init__.py: make the package paths more accurate when we fail to get them from setuptools. 2010-08-08 10:12:35 -07:00
david-sarah
dc53d4f5ef test_runner.py: another try at calculating the rootdir correctly for test-from-egg and test-from-prefixdir. 2010-08-08 08:43:07 -07:00
david-sarah
39fa9a81d1 test_runner.py: calculate the location of bin/tahoe correctly for test-from-prefixdir (by copying code from misc/build_helpers/run_trial.py). Also fix the false-positive check for Unicode paths in test_the_right_code, which was causing skips that should have been failures. 2010-08-07 21:28:17 -07:00
Brian Warner
4b7c94ece0 downloader.Segmentation: unregisterProducer when asked to stopProducing, this
seems to avoid the #1155 log message which reveals the URI (and filecap).

Also add an [ERROR] marker to the flog entry, since unregisterProducer also
makes interrupted downloads appear "200 OK"; this makes it more obvious that
the download did not complete.
2010-08-06 00:07:05 -07:00
david-sarah
a79ec1c6cd test_util.py: use SHA-256 from pycryptopp instead of MD5 from hashlib (for uses in which any hash will do), since hashlib was only added to the stdlib in Python 2.5. 2010-08-05 22:00:51 -07:00
david-sarah
600cb95fe2 test_runner.py: increase timeout to cater for Francois' ARM buildslave. 2010-08-05 21:26:01 -07:00
david-sarah
8e90255349 test_util.py: remove use of 'a if p else b' syntax that requires Python 2.5. 2010-08-05 21:16:16 -07:00
Brian Warner
a0124e95ee test_download.DownloadTest.test_simultaneous_goodguess: enable some disabled
checks that used to fail but work now.
2010-08-05 11:55:07 -07:00
Brian Warner
f6f9a97627 DownloadNode: fix lost-progress in fetch_failed, tolerate cancel when no segment-fetch is active. Fixes #1154.
The lost-progress bug occurred when two simultanous read() calls fetched
different segments, and the first one failed (due to corruption, or the other
bugs in #1154): the second read() would never complete. While in this state,
cancelling the second read by having its consumer call stopProducing) would
trigger the cancel-intolerance bug. Finally, in downloader.node.Cancel,
prevent late cancels by adding an 'active' flag
2010-08-05 11:55:07 -07:00
Brian Warner
43c5032105 util/spans.py: __nonzero__ cannot return a long either. for #1154 2010-08-05 11:55:07 -07:00