Commit Graph

5676 Commits

Author SHA1 Message Date
Brian Warner
9e449db50b Makefile: re-enable tarball uploads for "master" branch 2013-03-19 12:18:27 -07:00
David-Sarah Hopwood
1f38c92011 New Welcome page: ensure 'not connected' status for Introducer and Helper is shown via text as well as bullet colour. refs #1713
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-19 05:37:09 +00:00
David-Sarah Hopwood
50c6562901 Improve SFTP error handling and remove use of IFinishableConsumer. fixes #1525
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-19 05:37:02 +00:00
David-Sarah Hopwood
48a2989ee1 sftpd.py: switch from using bare asserts to assertutil.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-19 02:34:27 +00:00
Brian Warner
3e26c78ee3 introducer.client: use integer seqnums, not time-based. Closes #1767.
This stores the sequence number in BASEDIR/announcement-seqnum, and
increments it each time any service is published (every service
announcement is regenerated with the new sequence number). As everyone
knows, time is an illusion, and occasionally goes backwards, so a
counter is generally safer (and reveals less information about the
node).

Later, we'll improve the introducer client to tolerate rollbacks (where,
perhaps due to a VM being restarted from an earlier checkpoint, the
stored sequence number reverts to an earlier version).
2013-03-18 17:40:56 -07:00
Brian Warner
ff64a0fef5 fileutil.write: accept mode=, and use it in Node.write_config
I want mode="w" (i.e. text, with newline conversion) for code that
writes newline-terminated strings (which should also be human readable)
to files. I like to use things like "cat .tahoe/permutation-seed"
without seeing the seed jammed together with the next command prompt.
2013-03-18 17:34:57 -07:00
David-Sarah Hopwood
7130a247cf setup.py: add helpful comment on line that is a SyntaxError in Python < 2.6.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 18:27:58 +00:00
David-Sarah Hopwood
75f6c8ca08 test_web.py: relax tests for upload and mkdir forms to tolerate nondeterministic order of attributes.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 18:26:34 +00:00
David-Sarah Hopwood
5ab27f58cc Move embedded setuptools egg to reflect new version (0.6c16dev4).
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 16:53:32 +00:00
David-Sarah Hopwood
0e20ab6003 Tolerate import errors when loading extra commands for "setup.py --help-commands"
and bump zetuptoolz version to 0.6c16dev4. fixes #1405

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 16:53:32 +00:00
David-Sarah Hopwood
5082ca46f4 Update helper.rst to explain new-style config. fixes #1915
Author: Zooko Wilcox-O'Hearn <zooko>
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 16:53:32 +00:00
David-Sarah Hopwood
709be93a29 Redesigned Welcome page using Twitter Bootstrap CSS.
Author: Tony Arcieri <tarcieri>
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-17 16:53:32 +00:00
Brian Warner
427193d855 bump 'mock' dependency to >=0.8.0, to get the .call object
The 0.6.0 version that was previously allowed did not provide .call, so
test_cli.py failed during import.
2013-03-15 21:46:32 -07:00
David-Sarah Hopwood
7008ffa55e Require at least Python 2.6. fixes #1658
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 05:13:30 +00:00
David-Sarah Hopwood
3bdd744b8e Make doubly sure that we fail quickly on future Python 3.x versions. refs #1775
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 04:41:53 +00:00
David-Sarah Hopwood
edfb40e57c Ensure that bin/tahoe and setup.py fail quickly on Python 3.3+. fixes #1775
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 04:28:35 +00:00
David-Sarah Hopwood
52a583ce6d Add test for anti-Ubuntu-crash-reporter exception-catching code. fixes #1746
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 03:42:00 +00:00
David-Sarah Hopwood
ea9dfb0de1 tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
David-Sarah Hopwood
07c26ff805 Only quote newline characters where necessary. fixes #1484
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
Mike Kazantsev
0f499873b0 test_web.py: fix test_GET_DIRECTORY_html_filenode_encoding for Twisted==12.3.0. fixes #1922
twisted.web.html.escape was used to produce html-encoded string (to then look
it up in "value" attribute), but behavior of that function has changed between
Twisted 12.2.0 (simple custom implementation) and 12.3.0 (imported from stdlib
cgi module).
2013-02-27 23:21:38 +06:00
David-Sarah Hopwood
cdf1752a5d Add comment explaining fix to #1679. refs #1679
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-02-08 19:27:57 +00:00
Zooko O'Whielacronx
45c64edc76 do not cache and re-use imm filenodes in nodemaker
fixes #1679
2013-02-07 16:35:43 +00:00
Zooko O'Whielacronx
8df3a07625 unit test for #1679 2013-02-07 16:35:23 +00:00
David-Sarah Hopwood
a9272522d5 tahoe_check.py: tolerate missing fields in check results for LIT files/dirs. fixes #1758
Also test this case and improve some existing tests of 'tahoe check'.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-01-03 22:16:20 +00:00
David-Sarah Hopwood
456955e4f0 Make WUI headings and titles more consistent and accurate:
'Recent and Active Operations' and 'Operational Statistics'. fixes #1457

Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-29 23:54:54 +00:00
David-Sarah Hopwood
062ae99372 test_web.py: minor cleanup to test_helper_status.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-12-29 23:44:11 +00:00
David-Sarah Hopwood
a5895b9d59 If a helper is not configured, make the banner on the welcome page say that, and have a white background.
fixes #1735

Author: kick
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-29 04:17:00 +00:00
David-Sarah Hopwood
eba64f2aba docs/configuration.rst: clarification on scale suffixes for reserved_space.
refs #1812

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 23:38:58 +00:00
David-Sarah Hopwood
3888915996 Make abbreviate_space able to output in exabytes. refs #1812
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 20:08:27 +00:00
David-Sarah Hopwood
6d2ca45c4a Allow T (terabytes), P (petabytes), and E (exabytes), case-insensitive, in parse_abbreviated_size.
This also simplifies how case-insensitivity is handled, and fixes a corner case
where the wrong exception was raised when the size ends in "BB".
fixes #1812

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 20:08:00 +00:00
David-Sarah Hopwood
5c4ca677e1 Make the system test nodes have non-ASCII nicknames.
This ensures that non-ASCII nicknames are exercised with the real server code.
refs #1298

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 19:00:22 +00:00
David-Sarah Hopwood
0d4a826f0e Allow welcome and storage status pages to display a non-ASCII node nickname. fixes #1298
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-27 05:08:53 +00:00
David-Sarah Hopwood
4563ba456b Remove ResponseCache in favor of MDMFSlotReadProxy's cache. closes #1240.
This contains several merged patches. Individual messages follow, latest first:

* Fix a warning from check-miscaptures.
* In retrieve.py, explicitly test whether a key is in self.servermap.proxies
  rather than catching KeyError.
* Added a new comment to the MDMF version of the test I removed, explaining
  the removal of the SDMF version.
* Removed test_corrupt_all_block_hash_tree_late, since the entire block_hash_tree
  is cached in the servermap for an SDMF file.
* Fixed several tests that require files larger than the servermap cache.
* Remove unused test_response_cache_memory_leak().
* Exercise the cache.
* Test infrastructure for counting cache misses on MDMF files.
* Removed the ResponseCache. Instead, the MDMFSlotReadProxy initialized
  by ServerMap is kept around so Retrieve can access it. The ReadProxy
  has a cache of the first 1000 bytes initially read from each share by
  the ServerMap. We're able to satisfy a number of requests out of this
  cache, so roundtrips are reduced from 84 to 60 in test_deepcheck_mdmf.
  There is still some mystery about under what conditions the cache has
  fewer than 1000 bytes. Also this breaks some existing unit tests that
  depend on the inner behavior of ResponseCache.
* The servermap.proxies (a cache of SlotReadProxies) is now keyed
  by (verinfo,serverid,shnum) rather than just (serverid,shnum)
* Minor cosmetic changes
* Added a test failure if the number of cache misses is too high.

Author: Andrew Miller <amiller@dappervision.com>
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-27 00:00:17 +00:00
David-Sarah Hopwood
8618929833 docs/logging.rst: fix rst2html warnings.
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-22 23:47:47 +00:00
David-Sarah Hopwood
a125f83f1a docs/logging.rst: remove note about a bug that was fixed in foolscap 0.6.0.
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-22 23:39:11 +00:00
David-Sarah Hopwood
884685278b test/common_util.py: fix a bug in NonASCIIPathMixin that would cause spurious log entries on Windows.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-12-02 01:54:47 +00:00
Zooko O'Whielacronx
73d5a059bd tests: add more diagnostics when code-under-test fails
This prints out which things are different when two sets are expected to be the
same. This was useful to me when debugging the code under test. Hm, this
pattern might be more generally useful...
2012-11-29 14:11:47 -07:00
Zooko O'Whielacronx
abcde9645c remove unnecessary request from upload-helper
The unnecessary request was from the upload helper to the sender, and it was
there in order to trigger the sender to deliver cleartext hashes. But we've
long since removed cleartext hashes.

Unit tests pass both before and after this change, and code-coverage shows that
the block I changed is exercised in unit tests.
2012-11-29 13:44:32 -07:00
Zooko O'Whielacronx
06a8b1ea84 pkg_resources: better error message on bad spec
Include the text of the offending distribution spec when it is ill-formed.

I got an error message from pkg_resources.py saying that a distribution spec
was ill-formed, because it ended with an '=' and nothing came after the '='.
However, the error message and stack trace didn't tell which distribution spec
it was.

With this patch, it includes the distribution spec itself in the error message.

There is no unit test of this patch, but I did test it manually by inserting a
"raise ValueError('WHATEVER')" into the code and re-running it and observing
that the new output correctly included the distribution
2012-11-22 17:09:41 +00:00
David-Sarah Hopwood
d5c8580d8e NEWS.rst: add a missing dependency update for 1.9.2.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-20 05:59:00 +00:00
David-Sarah Hopwood
57017cebe8 Makefile: increase filesystem size for 'make tmpfstest'.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-16 20:30:19 +00:00
David-Sarah Hopwood
e097cf96b2 web/unlinked.py: don't use % operator to expand %(uri)s. fixes #1860.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-15 04:16:19 +00:00
David-Sarah Hopwood
4c91fa948d docs/frontends/CLI.rst: fix markup of * and ?.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-11 16:04:23 +00:00
David-Sarah Hopwood
86471233f0 docs/frontends/CLI.rst: document ./* trick, and that aliases should not be a single char on Windows.
Also fix some rst2html warnings. refs #1853, #1840

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-11 15:50:46 +00:00
David-Sarah Hopwood
522e74f572 Update docs/network-and-reliance-topology.svg for RAIC, and to be more accurate about frontend protocols.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-03 00:15:32 +00:00
David-Sarah Hopwood
1ffed22651 CLI: fix synopsis for 'tahoe ls'. fixes #1839
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-01 23:40:06 +00:00
David-Sarah Hopwood
a77ae772f2 docs/about.rst: fix broken link for network-and-reliance-topology image.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-01 23:09:07 +00:00
David-Sarah Hopwood
edc1f5f67f Makefile: add 'make tmpfstest', which uses a tmpfs for _trial_temp.
This probably only works on Linux. It uses sudo to mount and unmount the tmpfs,
which may prompt for a password. refs #20

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 02:16:21 +01:00
David-Sarah Hopwood
b3bf20748f test_runner: we no longer need to skip tests on Twisted < 9.0.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 01:17:12 +01:00
David-Sarah Hopwood
1df7f114b7 src/allmydata/web/directory.py: fix HTML double-encoding issue for filenames.
Nevow automatically HTML-escapes strings passed in stan without a raw marker.
Written by MK_FG. fixes #1143

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 01:01:25 +01:00