Commit Graph

2038 Commits

Author SHA1 Message Date
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
6363ab5727 docs: architecture.txt: some edits with Amber 2008-02-01 12:39:06 -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
Zooko O'Whielacronx
a2e1f13fd8 docs: update docs/about.html with Amber 2008-02-01 11:39:23 -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
b80cfeb186 munin stats: suppress output of data more that 5min old
if a node fails to report stats, the natural thing to do in re munin is to 
supress the data for that data series.  the previous tahoe-stats would output
whatever data was present in the stats_gatherer's stats.pickle, regardless of
how old.

this change means that if the gatherer hasn't received data within the last
5 min, then no data is reported to munin for that node.
2008-01-31 21:04:23 -07:00
robk-tahoe
e910a64e7d munin stats: change truncated nodeid to 4 char (not 8) 2008-01-31 19:21:17 -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
19b76cfadd Makefile: add 'upload-tarballs' target, using a foolscap-based file-transfer tool 2008-01-31 19:00:40 -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
bf25a041f3 tarballs: stick with setup.py's sdist command, which gives us bz2/gz/zip but not rz/7z/lrz. Closes #298. 2008-01-31 13:52:48 -07:00
Brian Warner
6b414074a9 offloaded.py: fix logging a bit 2008-01-31 13:45:01 -07:00
Brian Warner
4a363f0281 add 'tarballs' target, to generate compressed source tarballs 2008-01-30 20:45:14 -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
Brian Warner
a1b155725f log.py: update log.err() to take advantage of current foolscap's log.err 2008-01-30 18:47:23 -07:00
Brian Warner
412f2ceda5 install-details.html: debian 3.1 is better known as 'sarge' 2008-01-30 17:03:42 -07:00
robk-tahoe
7906d6d986 confwiz: update to record install and uninstall events. 2008-01-30 16:52:07 -07:00
Zooko O'Whielacronx
ca971559e6 make content-hash-key encryption a parameter of uploading
fixes #293
2008-01-30 12:24:50 -07:00
Zooko O'Whielacronx
991cbe4804 docs: add note that Debian 3.1 seems to have the same problem as Ubuntu Dapper with regard to Nevow and Twisted version compatibility 2008-01-30 12:21:17 -07:00
Zooko O'Whielacronx
424d338c82 tests: add a test that nevow can find its default css file 2008-01-30 11:41:58 -07:00
Brian Warner
8e1439d12d Makefile: touch .built on every build, so other targets can depend upon .built and avoid redundant rebuilds 2008-01-30 01:32:57 -07:00
Brian Warner
492cb92dc8 speedcheck: track SSK creation time separately 2008-01-29 20:44:32 -07:00
Brian Warner
f4c0167552 docs/dirnodes.txt: rewrite to reflect 0.7.0's RSA-based SDMF dirnodes 2008-01-29 19:13:58 -07:00
Brian Warner
583cc34d2f webish: remove 'URI-link' from directory page, now that we only use URI-links 2008-01-29 18:11:09 -07:00
Brian Warner
d9d0920177 webish: link to directory URIs rather than a child path. Addresses #103. 2008-01-29 18:04:32 -07:00
Brian Warner
c2c922b5e9 upload: add log message when AssistedUploader is done 2008-01-29 17:38:12 -07:00
Brian Warner
7e4ca29e33 _auto_deps.py: update comment 2008-01-29 13:53:21 -07:00
Brian Warner
346f1f5c8b _auto_deps: tolerate DistributionNotFound (but not VersionConflict), to accomodate distributions (i.e. gutsy) which provide our dependencies but don't include .egg-info files 2008-01-29 13:52:37 -07:00
Brian Warner
c6c5a37d3f upload: fix 'skipping_ahead' log message 2008-01-28 19:13:36 -07:00
Brian Warner
e14dcb92e2 offloaded: when uploading a file that failed to upload before, ask for the last byte of ciphertext, so the reader is prepared to give us the plaintext hashes 2008-01-28 19:05:43 -07:00
Brian Warner
8063aa8b86 WriteBucketProxy: improve __repr__ 2008-01-28 18:53:51 -07:00
Brian Warner
aa3b509323 upload.py: the 'skipping encryption' message was emitted exactly backwards 2008-01-28 18:38:38 -07:00
robk-tahoe
b41749efa0 confwiz: revise layout
fix the make-confwiz-match-installer-size changes, to eliminate some weird
layout/rendering bugs.  also tweaked the layout slightly to add space between
the warning label and the newsletter subscribe checkbox.
2008-01-28 14:36:03 -07:00
robk-tahoe
6832fa52c0 tweak config wizard window size
adjust the confiwiz frames to display at a size comparable to the innosetup
installer window
2008-01-28 14:07:13 -07:00
Brian Warner
4c5518faef webish: upload+localdir=missing should give an error 2008-01-28 14:48:06 -07:00
Brian Warner
3b41c939f8 webish: oops, unit tests don't have an Uploader, don't rely upon it for helper-status display 2008-01-28 14:03:29 -07:00
Brian Warner
8485ff53fc display the Helper FURL and our connection status on the welcome page. Closes #285. 2008-01-28 13:56:22 -07:00
Brian Warner
69a0b5cc00 CHK upload helper: don't let one failed upload prevent us from trying again 2008-01-28 12:58:13 -07:00
Brian Warner
96d5455a53 macapp.py: cosmetic, remove trailing whitespace 2008-01-28 12:46:54 -07:00
Brian Warner
504bbe4a16 encode.py: update logging levels 2008-01-28 12:15:27 -07:00
Brian Warner
8f1212edac encode.py: don't allow a shareholder which dies in start() to kill the whole upload 2008-01-28 12:14:48 -07:00
Brian Warner
a36ed9b5b7 encode.py: don't record BAD log event unless there is actually a problem 2008-01-28 11:59:10 -07:00