nejucomo [Wed, 30 Jan 2008 08:27:42 +0000 (01:27 -0700)]
docs: webapi: Add concise shorthand for options, input, output, and statuses to the operation descriptions...
I'm not convinced if this is the best way to do this, but I find it
handy to have a conscise "quick reference" for the webapi operations
which summarize all related I/O.
Another possibility is to reject this patch, but create a separate
"webapi_quickref.html" with a concise table.
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.
robk-tahoe [Fri, 1 Feb 2008 04:04:23 +0000 (21:04 -0700)]
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.
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.
robk-tahoe [Thu, 31 Jan 2008 03:11:07 +0000 (20:11 -0700)]
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.
Brian Warner [Tue, 29 Jan 2008 20:52:37 +0000 (13:52 -0700)]
_auto_deps: tolerate DistributionNotFound (but not VersionConflict), to accomodate distributions (i.e. gutsy) which provide our dependencies but don't include .egg-info files
Brian Warner [Tue, 29 Jan 2008 02:05:43 +0000 (19:05 -0700)]
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
robk-tahoe [Mon, 28 Jan 2008 21:36:03 +0000 (14:36 -0700)]
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.
robk-tahoe [Sat, 26 Jan 2008 02:01:32 +0000 (19:01 -0700)]
confwiz: use get_config call to backend
this will write an arbitrary number of config files, instead of being restricted
to just the introducer.furl, based on the response of the php backend.
the get_config is passed username/password
robk-tahoe [Fri, 25 Jan 2008 03:00:28 +0000 (20:00 -0700)]
Reworked mac gui to not lock up upon launch
Previously, once the node itself was launched, the UI event loop was no longer
running. This meant that the app would sit around seemingly 'wedged' and being
reported as 'Not Responding' by the os.
This chnages that by actually implementing a wxPython gui which is left running
while the reactor, and the node within it, is launched in another thread.
Beyond 'quit' -> reactor.stop, there are no interactions between the threads.
The ui provides 'open web root' and 'open account page' actions, both in the
file menu, and in the (right click) dock icon menu.
Something weird in the handling of wxpython's per-frame menubar stuff seems to
mean that the menu bar only displays the file menu and about etc (i.e. the items
from the wx menubar) if the focus changes from and back to the app while the
frame the menubar belongs to is displayed. Hence a splash frame comes up at
startup to provide an opportunity.
It also seems that, in the case that the file menu is not available, that one
can induce it to reappear by choosing 'about' from the dock menu, and then
closing the about window.
robk-tahoe [Thu, 24 Jan 2008 04:06:41 +0000 (21:06 -0700)]
cleanup mac and windows build code
this moves some of the code common to both windows and mac builds into the
allmydata module hierarchy, and cleans up the windows and mac build directories
to import the code from there.
robk-tahoe [Thu, 24 Jan 2008 01:52:43 +0000 (18:52 -0700)]
further fixes to windows build (pkg_resources / web templates)
now that web templates are found via pkg_resources, then the windows build
should in fact _use_ pkg_resources, rather than exclude it from the build
to prevent nevow exploding upon import due to the zip provider exception,
so that the pkgreshook can do install location based lookups
robk-tahoe [Thu, 24 Jan 2008 01:23:37 +0000 (18:23 -0700)]
fix windows build's packaging of web templates
the recent changes to webish's template lookup (to use nevow.util hence
pkg_resources) to support the mac build, needs these changes to the windows
build in match the new lookup path
robk-tahoe [Thu, 24 Jan 2008 01:22:23 +0000 (18:22 -0700)]
eliminate startup spam for resources that can't be found
remove debug messages (and traceback) from node output in the case that the
pkg resources hook can't find a requested file. it will now silently return
the empty string for files that can't be resolved
robk-tahoe [Thu, 24 Jan 2008 01:05:56 +0000 (18:05 -0700)]
fix tahoe script installation logic
refine the logic in the .app which tries to install the 'tahoe' script.
now it will do nothing if 'tahoe' is found anywhere on the user's path,
and only if it's not present will it try to install it in each of the
candidate paths (/usr/local/bin ~/bin ~/Library/bin) which are on the
user's path
robk-tahoe [Wed, 23 Jan 2008 22:17:27 +0000 (15:17 -0700)]
fix windows build
having changed the web template retrieval to use nevow.util.resource_filename
(and hence through pkg_resources when available) that adds a requirement that
py2exe be given a hint to induce it to include the allmydata.web module so that
it becomes importable.
setup: weaken the requirement on zope.interface from >= 3.1.0 to "any"
We've never heard of a version of zope.interface that *wasn't* compatible, and there is a bug in Ubuntu's packaging of zope.interface which causes it to report its version number as 0.0.0:
setup: loosen our requirement on pycryptopp from >= 0.2.9 to >= 0.2.8
Again, tahoecs2 has pycryptopp v0.2.8, and reviewing the pycryptopp change history shows that there were no important bugfixes added since 0.2.8.
robk-tahoe [Wed, 23 Jan 2008 03:35:01 +0000 (20:35 -0700)]
have mac app write a tahoe upon startup
upon startup, the .app will look in '/usr/local/bin', '~/bin', '~/Library/bin'
if it finds one of these dirs, and can write into it, and there isn't already
a 'tahoe' present, it will write a small bach script which will launch the
binary contained within the .app bundle
this allows the .app bundle to offer the services of the 'tahoe' script
easily and simply
robk-tahoe [Wed, 23 Jan 2008 02:32:55 +0000 (19:32 -0700)]
fix build breakage caused by auto_deps setuptools stuff
zooko recently added a runtime check, via setuptools, that specific versions of various
packages were reported as available through setuptools at runtime.
however exe and app builds run with collected egg contents, not linked against entire
eggs, i.e. the code is transcluded into a single library.zip
thus setuptools reports that those specific version cannot be reported as available,
though they are in fact available built into the library
this disables that runtime check if the app is running 'frozen'