Commit Graph

1147 Commits

Author SHA1 Message Date
Brian Warner
75e4332462 offloaded: oops, need more tricks to make the unit tests pass 2008-02-06 17:51:11 -07:00
Brian Warner
a2cace9cfb helper: return full uri-extension data to the client, so it can compare encoding parameters 2008-02-06 17:30:58 -07:00
Brian Warner
6cd32c2f5c interfaces: remove spurious line that counted against the figleaf coverage 2008-02-06 16:41:26 -07:00
Brian Warner
d87bfa9eb2 test_util: add full coverage for allmydata.util.deferredutil 2008-02-06 16:41:04 -07:00
Brian Warner
d6fb0bf039 tahoe dump-share: remove --filename option, just take it from argv 2008-02-06 14:15:33 -07:00
Brian Warner
4d4073fb16 test_system: deferred-handling logic in test_upload_and_download was broken 2008-02-06 14:05:11 -07:00
Brian Warner
b4c9409138 dump-share: tweak formatting a little bit, to make dumping multiple shares in a row easier to read 2008-02-06 13:37:43 -07:00
Brian Warner
2dcac796e9 add 'tahoe find-shares' command, to locate share files on a local node's disk 2008-02-06 13:19:51 -07:00
Brian Warner
e92a2b5ab2 dump-cap: include UEB_hash in output 2008-02-06 12:48:19 -07:00
Brian Warner
40c2371e77 download.py: make logging safe in ValidatedBucket 2008-02-06 02:50:34 -07:00
Brian Warner
590b020a44 webish: more upload stats: total encode-and-push rate, already-in-grid existence check time 2008-02-06 02:39:01 -07:00
Brian Warner
6e0d3059a3 webish: add when_done= to POST /uri?t=upload . I did not add a 'recent uploads' section to the welcome page, but I think the new upload-results page provides the desired data 2008-02-06 02:38:16 -07:00
Brian Warner
652d50d7e0 UploadResults: add more helper timing stats (ciphertext fetch times) 2008-02-06 02:12:35 -07:00
Brian Warner
124fb5ecdf add upload-results timing info for helper uploads. This changes the Helper protocol, and introduces a compatibility break 2008-02-06 01:52:25 -07:00
Brian Warner
93d45abb02 add upload timings and rates to the POST /uri?t=upload results page 2008-02-06 00:41:51 -07:00
Brian Warner
1e4504463c webish: make POST /uri?t=upload deposit you on an 'Upload Results' page 2008-02-05 23:01:37 -07:00
Brian Warner
604d6d54ef webish.py: refactor /uri handlers, one rend.Page class per operation 2008-02-05 22:38:20 -07:00
Brian Warner
27f46f2aaf test_web.py: hush pyflakes 2008-02-05 22:37:51 -07:00
Brian Warner
23c2c8d660 webish: add PUT /uri?mutable=true 2008-02-05 22:18:02 -07:00
Brian Warner
e5dc9a8486 webish: add POST /uri?t=upload&mutable=true 2008-02-05 22:10:22 -07:00
Brian Warner
6afe50e2aa webish: add upload/view-uri forms (not associated with any particular directory) to the welcome page. Document POST /uri?t=upload . 2008-02-05 21:44:40 -07:00
Brian Warner
66f33ee504 upload: return an UploadResults instance (with .uri) instead of just a URI 2008-02-05 21:01:38 -07:00
Brian Warner
2f09b03bcc webish: add storage-consumed estimate on welcome page 2008-02-05 20:29:39 -07:00
Brian Warner
5103bf8148 storage: change service name from 'storageserver' to 'storage' 2008-02-05 20:28:59 -07:00
Brian Warner
4b4eba867b webish: display tahoe import path on the welcome page, to help figure out where the code is coming from 2008-02-05 20:08:49 -07:00
Brian Warner
315725926f refactor node startup, remove tub_ready() 2008-02-05 19:58:38 -07:00
Brian Warner
eb9023ab0e webish: condense display of nickname a little bit 2008-02-05 18:29:28 -07:00
Brian Warner
96e6c78c7a webish: show nickname too 2008-02-05 18:26:05 -07:00
Brian Warner
d146ef7e09 webish: add extra introducer data (version, timestamps) to Welcome page 2008-02-05 17:32:27 -07:00
Brian Warner
a7ea39e626 test_introducer.py: increase timeouts on poll() calls 2008-02-05 16:37:58 -07:00
Brian Warner
d98fde952c introducer: remove remaining bits of 'push-to-myself' flags. The uploading/downloading node is no longer special. 2008-02-05 14:16:01 -07:00
Brian Warner
80b72d919a introducer: remove PeerCountObserver, tests are managing with purely poll-for-connected approachers 2008-02-05 14:15:49 -07:00
Brian Warner
daecca6589 big introducer refactoring: separate publish+subscribe. Addresses #271. 2008-02-05 13:05:13 -07:00
Brian Warner
3a5ba35215 PollMixin: add timeout= argument, rewrite to avoid tail-recursion problems 2008-02-04 20:35:07 -07:00
robk-tahoe
f5a803303f stats: fix service issues
having moved inititalisation into startService to handle tub init cleanly,
I neglected the up-call to startService, which wound up not starting the
load_monitor.

also I changed the 'running' attribute to 'started' since 'running' is
the name used internally by MultiService itself.
2008-02-01 18:57:31 -07:00
Brian Warner
769446b667 client.py: hush pyflakes 2008-02-01 20:28:15 -07:00
Brian Warner
054f25581c client.py: touch BASEDIR/no_storage to not publish a storage server. Addresses #271 2008-02-01 20:07:08 -07:00
Brian Warner
a01f9ce9cc introducer: allow nodes to refrain from publishing themselves, by passing furl=None. This would be useful for clients who do not run storage servers. 2008-02-01 19:48:38 -07:00
Zooko O'Whielacronx
1d1628e525 rename storage_index_chk_hash() to storage_index_hash() and add TODO about how our use of it now includes keys that are not CHKs 2008-02-01 12:27:37 -07:00
robk-tahoe
e5487bbe21 stats: added IStatsProducer interface, fixed stats provider startup
this adds an interface, IStatsProducer, defining the get_stats() method
which the stats provider calls upon and registered producer, and made the
register_producer() method check that interface is implemented.

also refine the startup logic, so that the stats provider doesn't try and
connect out to the stats gatherer until after the node declares the tub
'ready'.  this is to address an issue whereby providers would attach to
the gatherer without providing a valid furl, and hence the gatherer would
be unable to determine the tubid of the connected client, leading to lost
samples.
2008-01-31 21:10:15 -07:00
robk-tahoe
0700ccabaa stats_gatherer: reject "<unauth>" as a tubid, to avoid screwing up the data. 2008-01-31 19:11:31 -07:00
Brian Warner
670933ecee storage: clean up use of si_s vs si_dir, add test for BadWriterEnabler message, add some logging 2008-01-31 17:48:48 -07:00
Zooko O'Whielacronx
7bf21082f7 remove unused import (thanks, pyflakes) 2008-01-31 17:00:59 -07:00
Zooko O'Whielacronx
79c439d026 storage: make two levels of share directories so as not to exceed certain filesystems's limitations on directory size
The filesystem which gets my vote for most undeservedly popular is ext3, and it has a hard limit of 32,000 entries in a directory.  Many other filesystems (even ones that I like more than I like ext3) have either hard limits or bad performance consequences or weird edge cases when you get too many entries in a single directory.

This patch makes it so that there is a layer of intermediate directories between the "shares" directory and the actual storage-index directory (the one whose name contains the entire storage index (z-base-32 encoded) and which contains one or more share files named by their share number).

The intermediate directories are named by the first 14 bits of the storage index, which means there are at most 16384 of them.  (This also means that the intermediate directory names are not a leading prefix of the storage-index directory names -- to do that would have required us to have intermediate directories limited to either 1024 (2-char), which is too few, or 32768 (3-chars of a full 5 bits each), which would overrun ext3's funny hard limit of 32,000.))

This closes #150, and please see the "convertshares.py" script attached to #150 to convert your old tahoe-0.7.0 storage/shares directory into a new tahoe-0.8.0 storage/shares directory.
2008-01-31 16:26:28 -07:00
Brian Warner
6b414074a9 offloaded.py: fix logging a bit 2008-01-31 13:45:01 -07:00
robk-tahoe
7b9f3207d0 stats: add a simple stats gathering system
We have a desire to collect runtime statistics from multiple nodes primarily
for server monitoring purposes.   This implements a simple implementation of
such a system, as a skeleton to build more sophistication upon.

Each client now looks for a 'stats_gatherer.furl' config file.  If it has
been configured to use a stats gatherer, then it instantiates internally
a StatsProvider.  This is a central place for code which wishes to offer
stats up for monitoring to report them to, either by calling 
stats_provider.count('stat.name', value) to increment a counter, or by
registering a class as a stats producer with sp.register_producer(obj).

The StatsProvider connects to the StatsGatherer server and provides its
provider upon startup.  The StatsGatherer is then responsible for polling
the attached providers periodically to retrieve the data provided.
The provider queries each registered producer when the gatherer queries
the provider.  Both the internal 'counters' and the queried 'stats' are
then reported to the gatherer.

This provides a simple gatherer app, (c.f. make stats-gatherer-run)
which prints its furl and listens for incoming connections.  Once a
minute, the gatherer polls all connected providers, and writes the
retrieved data into a pickle file.

Also included is a munin plugin which knows how to read the gatherer's
stats.pickle and output data munin can interpret.  this plugin, 
tahoe-stats.py can be symlinked as multiple different names within
munin's 'plugins' directory, and inspects argv to determine which
data to display, doing a lookup in a table within that file.
It looks in the environment for 'statsfile' to determine the path to
the gatherer's stats.pickle.  An example plugins-conf.d file is
provided.
2008-01-30 20:11:07 -07:00
Brian Warner
22071c00e0 upload: oops, fix breakage after removing upload_file/upload_data/etc 2008-01-30 19:41:43 -07:00
Brian Warner
909d848071 remove upload.upload_(data,filename,filehandle) convenience functions 2008-01-30 19:03:19 -07:00
Brian Warner
44ff4c6605 upload: Data should use convergence by default 2008-01-30 19:02:56 -07:00
Brian Warner
81eeafc574 upload-helper: avoid duplicate uploads: check the grid to see if the file already exists 2008-01-30 18:49:02 -07:00