Commit Graph

84 Commits

Author SHA1 Message Date
david-sarah
f036dfaa4b Fix test failures due to Unicode basedir patches. 2010-07-24 18:03:18 -07:00
david-sarah
618db4867c Replace uses of os.path.abspath with abspath_expanduser_unicode where necessary. This makes basedir paths consistently represented as Unicode. 2010-07-21 17:14:18 -07:00
Brian Warner
acd211765c node.py/interfaces.py: minor docs fixes 2009-12-29 15:04:09 -08:00
Brian Warner
7950fc0f2e node.py: record pid in twisted log at startup. Closes #476. 2009-07-15 00:29:29 -07:00
Brian Warner
8df15e9f30 big rework of introducer client: change local API, split division of responsibilites better, remove old-code testing, improve error logging 2009-06-22 19:10:47 -07:00
Brian Warner
1863aee0aa switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem 2009-05-21 17:46:32 -07:00
Brian Warner
c9803d5217 switch all foolscap imports to use foolscap.api or foolscap.logging 2009-05-21 17:38:23 -07:00
Brian Warner
26ca53fa3d node.py: use NODEDIR/tmp for the 'tempfile' module's temporary directory, so webapi upload tempfiles are put there instead of /tmp . You can set it to something else by setting [node]tempdir in tahoe.cfg 2009-01-14 20:00:15 -07:00
Brian Warner
9976bd439a tahoe.cfg: add tub.location, to override the location hints we include in our FURL. This replaces advertised_ip_addresses, which doesn't remain useful enough to retain it. Helps with #517 (Tor). 2008-11-12 18:44:58 -07:00
Brian Warner
67ae5c1b2f node.py: remove unused old_log() function 2008-10-28 21:35:58 -07:00
Brian Warner
ba26239879 node.py: remove support for the old BASEDIR/authorized_keys.PORT file 2008-10-28 21:34:20 -07:00
Brian Warner
cd26f58305 #518: replace various BASEDIR/* config files with a single BASEDIR/tahoe.cfg, with backwards-compatibility of course 2008-09-30 16:21:49 -07:00
robk-tahoe
90e3f37173 manhole: be more tolerant of authorized_keys. files in .tahoe
both peter and I independently tried to do the same thing to eliminate the
authorized_keys file which was causing problems with the broken mac build
(c.f. #522) namely mv authorized_keys.8223{,.bak}  but the node is, ahem,
let's say 'intolerant' of the trailing .bak - rather than disable the
manhole as one might expect, it instead causes the node to explode on
startup.  this patch makes it skip over anything that doesn't pass the
'parse this trailing stuff as an int' test.
2008-09-24 20:11:49 -07:00
Brian Warner
dd9171eb72 node.py: add BASEDIR/keepalive_timeout and BASEDIR/disconnect_timeout, to set/enable the foolscap timers, for #521 2008-09-24 10:51:12 -07:00
Zooko O'Whielacronx
8874e27da0 setup: fix bug in recent patch to use allmydata.get_package_versions() to tell the foolscap app-version-tracking what's what 2008-09-22 17:13:47 -07:00
Zooko O'Whielacronx
992339b97e setup: when using the foolscap "what versions are here?" feature, use allmydata.get_package_versions() instead of specifically importing allmydata, pycryptopp, and zfec 2008-09-22 17:03:51 -07:00
Brian Warner
c6999d219e use foolscap's new app_versions API, require foolscap-0.3.1 2008-09-20 11:38:53 -07:00
Brian Warner
0a59991ce6 various: use util.log.err instead of twisted.log.err, so we get both Incidents and trial-test-flunking 2008-09-20 10:35:45 -07:00
Brian Warner
7dc8ff0263 re-enable incident-reporting, but disable it in unit tests, because they take 150% longer, and the leftover trailing timers cause errors 2008-07-06 23:49:08 -07:00
Brian Warner
13d0ba72a4 disable incident reporting: unit tests are failing because of the leftover post-incident timer 2008-07-02 18:24:00 -07:00
Brian Warner
d58591ceba start using Foolscap's 'incident-logging' feature, which requires foolscap-0.2.9 2008-07-02 17:40:29 -07:00
Brian Warner
3f5fed0bd4 node.py: make twistd.pid world-readable, so stats-gathering tools (specifically memory-measuring munin plugins) can see it 2008-03-26 18:37:54 -07:00
robk-tahoe
6177a958d0 macapp: simplify node startup failure reporting
1. changed the node's exit-on-error behaviour. rather than logging debug and
then delegating to self for _abort_process() instead simply delegate to self
_service_startup_failed(failure) to report failures in the startup deferred
chain. subclasses then have complete control of handling and reporting any
failures in node startup.

2. replace the convoluted wx.PostEvent() glue for posting an event into the
gui thread with the simpler expedient of wx.CallAfter() which is much like
foolscap's eventually() but also thread safe for inducing a call back on the
gui thread.
2008-03-06 15:09:04 -07:00
robk-tahoe
ee67d788cd macapp: report failure of node startup to the user
in certain cases (e.g. the node.pem changed but old .furls are in private/)
the node will abort upon startup. previously it used os.abort() which in these
cases caused the mac gui app to crash on startup with no explanation.

this changes that behaviour from calling os.abort() to calling 
node._abort_process(failure) which by default calls os.abort().  this allows 
that method to be overridden in subclasses.

the mac app now provides and uses such a subclass of Client, so that failures
are reported to the user in a message dialog before the process exits.
this uses wx.PostEvent() with a custom event type to signal from the reactor
thread into the gui thread.
2008-03-06 13:53:21 -07:00
Brian Warner
315725926f refactor node startup, remove tub_ready() 2008-02-05 19:58:38 -07:00
Brian Warner
547375a488 node.py: when calling os.abort(), announce it to stdout as well as the log 2008-01-16 03:01:32 -07:00
Brian Warner
cb76ed36f9 logging: enable flogging in more places, replace Node.log with flogging 2008-01-14 21:16:58 -07:00
Brian Warner
4ce196a9c4 node.py: remove the provoke-logport-furlfile-creation hack now that foolscap-0.2.3 does it for us, and add bridge-twisted-logs 2007-12-24 17:24:40 -07:00
Zooko O'Whielacronx
1ac11301a7 setup: finish switching from Tahoe's versions of autoversioning tools to pyutil's versions 2007-12-21 14:42:38 -07:00
Brian Warner
2308420fc6 node: provoke foolscap-0.2.2 into saving logport.furl, so we can attach to it with 'flogtool dump'. Also, place it in private/, since logs are considered somewhat private 2007-12-18 23:27:02 -07:00
Zooko O'Whielacronx
8c65bdcf9d put all private state in $BASEDIR/private
fixes #219

The only part of #219 that this doesn't include is the part about 
logpublisher, which has been moved out of tahoe into foolscap.
2007-12-17 16:39:54 -07:00
Brian Warner
69b65b6b01 remove logpublisher, use the Foolscap version now that this functionality has been moved into Foolscap-0.2.2 2007-12-12 20:31:01 -07:00
Zooko O'Whielacronx
0949638c11 remove unused import: thanks, pyflakes 2007-12-12 20:05:30 -07:00
Zooko O'Whielacronx
caa69b007e refactor the feature of getting versions of packages, include the version numbers of more of the packages that we use 2007-12-12 19:37:37 -07:00
Zooko O'Whielacronx
192477e4a2 move increase_rlimits() into iputil and make it a no-op on Windows 2007-12-07 08:03:43 -07:00
Brian Warner
d3e782a226 introducer_and_vdrive.py: use logpublisher too 2007-11-20 14:22:26 -07:00
Brian Warner
cc1612aee5 hierarchical logging: add numbered messages and parent= args 2007-11-19 18:23:18 -07:00
Brian Warner
2fc5247996 node.py: try to fix rlimit-setting again 2007-11-16 16:12:38 -07:00
Brian Warner
0900f328b7 node.py: try rlimit fix again 2007-11-15 23:09:02 -07:00
Brian Warner
d5c0a85c68 node.py: try to fix RLIMIT_NOFILE on solaris too 2007-11-15 23:06:44 -07:00
Brian Warner
c6df66d736 node.py: raise RLIMIT_NOFILE on bsd/cygwin to more than 256 2007-11-15 22:53:55 -07:00
Zooko O'Whielacronx
59d6c3c822 decentralized directories: integration and testing
* use new decentralized directories everywhere instead of old centralized directories
 * provide UI to them through the web server
 * provide UI to them through the CLI
 * update unit tests to simulate decentralized mutable directories in order to test other components that rely on them
 * remove the notion of a "vdrive server" and a client thereof
 * remove the notion of a "public vdrive", which was a directory that was centrally published/subscribed automatically by the tahoe node (you can accomplish this manually by making a directory and posting the URL to it on your web site, for example)
 * add a notion of "wait_for_numpeers" when you need to publish data to peers, which is how many peers should be attached before you start.  The default is 1.
 * add __repr__ for filesystem nodes (note: these reprs contain a few bits of the secret key!)
 * fix a few bugs where we used to equate "mutable" with "not read-only".  Nowadays all directories are mutable, but some might be read-only (to you).
 * fix a few bugs where code wasn't aware of the new general-purpose metadata dict the comes with each filesystem edge
 * sundry fixes to unit tests to adjust to the new directories, e.g. don't assume that every share on disk belongs to a chk file.
2007-12-03 14:52:42 -07:00
Brian Warner
d777283e9e implement preliminary log publisher/gatherer
This creates a Referenceable object that will eventually be able to publish
log events to a remote subscriber (at present all it can do is provide
version information). The FURL for this logport is written to 'logport.furl'.

In addition, if a file named 'log_gatherer.furl' is present, the given target
will be contacted and offered access to the logport. This can be used by a
centralized logging agent to subscribe to logs, e.g. from all the nodes in a
centrally-maintained storage grid. (think syslog -r, but with all the
security properties of FURLs, and permitting non-printable strings and
structured data).

Once this framework matures a bit, it will be moved into Foolscap.
2007-11-01 17:29:15 -07:00
Brian Warner
a037049188 trailing-whitespace eradication, no functional changes 2007-11-01 15:34:01 -07:00
czooko
5f9f54c11c trivial change to comment -- sentences start with a capital letter and end with a punctuation mark
I've been volunteering in Irby's first-grade class, and you do NOT get a star
on your Power Sentences worksheet unless you follow this rule.
2007-10-22 16:55:20 -07:00
czooko
3847228444 patch the LogObserver in a more modern, forward-compatible way and update the in-line comments about it 2007-10-22 16:52:55 -07:00
Zooko O'Whielacronx
fbc5bdf607 remove unused imports (thanks, pyflakes) 2007-10-15 08:32:21 -07:00
Zooko O'Whielacronx
ed84534c5b a slightly nicer method of computing our timestamp format 2007-10-14 20:46:51 -07:00
Zooko O'Whielacronx
240de64598 install our custom timestamp formats in a less disruptive way
The unit tests on Windows fail because trial is attempting to remove its own
log observer during teardown.  This patch customizes the extant log observer
object by replacing its formatTime method with our own.

I first tried the approach of storing their log observer object and putting it
back during teardown, but it didn't work (perhaps because our node object
doesn't get a chance to do its deferred stopService behavior in time), and
anyway I generally prefer the "fail-safe", or "crash-only" design.
2007-10-14 20:43:11 -07:00
Brian Warner
654bbbed8f node.py: fix timestamps (add ms and Z) by replacing the FileLogObserver. #171. 2007-10-11 17:30:07 -07:00