Commit Graph

2718 Commits

Author SHA1 Message Date
Brian Warner
9e460cd22e mutable: cosmetic changes 2008-03-10 15:44:05 -07:00
Brian Warner
d6cde55c63 mutable: minor refactoring of _do_read, to make other tests easier 2008-03-10 15:42:56 -07:00
Zooko O'Whielacronx
cad26e000d fix pyflakes warning 2008-03-10 16:14:03 -07:00
Brian Warner
1ddeb88e9b architecture.txt: make it clear that accounting/leases are not yet implemented 2008-03-10 12:25:19 -07:00
Peter Secor
ff1b2c770e reverting a change zooko made (2258) to see if it clears up problems in the windows build 2008-03-10 11:37:49 -07:00
Brian Warner
567979ba85 lower max_segsize for immutable files to 128KiB, to make download-progress smoother and improve alacrity. Closes #252. Note that mutable files continue to use 1MiB segments. 2008-03-07 19:24:51 -07:00
robk-tahoe
bd58f6f799 macapp: new mac icon
this provides a new icon for the .app bundle
also removes the setting of the dock icon from within wx
(which previously used a different icon)
2008-03-07 18:48:28 -07:00
Brian Warner
8815b30b9b webish: show storage sizelimit, abbreviate current usage 2008-03-06 21:16:38 -07:00
Zooko O'Whielacronx
1f7931e596 docs: trivial edit 2008-03-06 18:32:30 -07:00
Zooko O'Whielacronx
3945188401 setup: don't install, just "develop" in setup.py in build target 2008-03-06 18:28:20 -07:00
Zooko O'Whielacronx
56c71f1bf4 setup: don't echo the echo of EGGSPATH 2008-03-06 18:18:56 -07:00
robk-tahoe
4bbaaff49f macfuse: fix unicode handling
at one point I'd thrown in a 'str' since fuse api bits required a str instance
but tahoe returns unicode objects from its json parsing.  that, naturally
enough should really be a utf8 encoded str of the unicode object...
2008-03-06 17:43:25 -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
Zooko O'Whielacronx
d5886bed2f doc: tiny change about status of mutable.txt 2008-03-06 15:02:15 -07:00
Brian Warner
3a8bd1b772 webish: add more share information to upload status, including assisted uploads 2008-03-05 19:51:51 -07:00
Brian Warner
dd4a951770 webish: add publish status 2008-03-05 18:41:10 -07:00
robk-tahoe
2c81988ed3 confwiz: add nickname determination
the confwiz now uses socket.gethostname() if a 'nickname' file doesn't already
exist, and passes that nickname into the 'record_install' method on the backend,
so that the moniker can be recorded in the system table.
2008-03-05 16:34:18 -07:00
Brian Warner
456b437608 docs/mutable: describe deep-verify-cap scheme, update picture 2008-03-05 16:54:26 -07:00
Brian Warner
3a331f6822 webish: split out 'unlinked' operations 2008-03-05 15:12:42 -07:00
Brian Warner
4fa622f9b1 webish: this file is too big, start breaking it into pieces, beginning with status 2008-03-05 14:59:56 -07:00
Brian Warner
f46cb5cd6d mutable-retrieve: only record server response times for queries that we don't ignore 2008-03-04 21:10:52 -07:00
Brian Warner
8160a4f2f2 mutable: when retrieving, don't try to grab the encprivkey, to save a roundtrip 2008-03-04 21:08:24 -07:00
Brian Warner
ec23da28a6 webish: add more mutable-retrieve timing status 2008-03-04 21:04:36 -07:00
Brian Warner
ca1a1762e2 web: status: add 'started' timestamps to all operations 2008-03-04 18:50:44 -07:00
Zooko O'Whielacronx
cedc653aa5 apply dreid's patch from #335 to fix the provisioning page in zipped distributions 2008-03-09 08:50:46 -07:00
Brian Warner
7d9bfbcabe mutable: oops, .download *is* in use, by the speedtest. Restore it and add a test. 2008-03-04 15:11:40 -07:00
Brian Warner
4daa817502 test_util.py: get 100% test coverage for hashutil.py 2008-03-04 14:42:25 -07:00
Brian Warner
95a085763f uri.py: get 100% test coverage, fix a few bugs in the process 2008-03-04 14:27:45 -07:00
Brian Warner
72f139653b mutable.py: remove unused 'download' method (we only have download_to_data for now) 2008-03-04 14:01:55 -07:00
Brian Warner
e6489b1ef2 test_filenode.py : improve coverage of mutable filenode, fix a bug in __hash__ 2008-03-04 14:01:28 -07:00
Brian Warner
f6ca62df31 test_system: improve test coverage of publish/retrieve status 2008-03-04 01:24:35 -07:00
Brian Warner
68fbd89e66 webish: add primitive publish/retrieve status pages 2008-03-04 01:07:44 -07:00
Brian Warner
7e159feb27 stats: make StatsGatherer happy about sharing a process with other services, add one during system test to get some test coverage 2008-03-03 23:55:58 -07:00
Brian Warner
abb51e70f3 test_web: improve upload/download status coverage 2008-03-03 21:56:23 -07:00
Brian Warner
3ecb483e35 test_system: add test coverage for download-status and upload-status 2008-03-03 21:37:17 -07:00
Brian Warner
18eb00d136 webish: download-results: add per-server response times 2008-03-03 20:53:45 -07:00
Brian Warner
886ef22335 webish: download-results: add server_problems 2008-03-03 20:30:35 -07:00
Brian Warner
def910c391 webish download results: add servermap, decrypt time 2008-03-03 20:09:32 -07:00
Brian Warner
2b49605c51 webish: add 'download results', with some basic timing information 2008-03-03 19:19:21 -07:00
Brian Warner
c8e24f0904 webish: make upload timings visible on the recent uploads/downloads status page 2008-03-03 14:48:52 -07:00
Brian Warner
436baa1b19 webish: add per-file upload/download status pages 2008-02-29 23:03:00 -07:00
Brian Warner
1a7651ce82 retain 10 most recent upload/download status objects, show them in /status . Prep for showing individual status objects 2008-02-29 22:19:03 -07:00
robk-tahoe
33c7733e35 macfuse: increase default timeout in ui launched mounts
when an operation takes 'too long', on 10.4 the user gets a dialog about
the problem with a 'force eject / keep trying' choice. on 10.5 the fuse
system seems to summarily unmount the drive.

this showed up in 10.5 testing because the time to open() a file depended
upon the size of the file, and an 8Mb test file took long enough for the
node to download that the open() call didn't respond within 60s and fuse
spontaneously ejected the drive, quitting the plugin (and cancelling the
download).

this changes the fuse options passed to the plugin by the ui when the 
'mount filesystem' window is used.  command line users should check out
the '-odaemon_timeout=...' option.  this changes the default timeout from
60s to 300s (5min) for ui launched plugins.

this will be addressed in a deeper manner at a later date, with a more
advanced fuse subsystem which can interleave open()/read() with the
actual download of the file, only blocking when data is not downloaded
yet.
2008-02-29 20:18:15 -07:00
robk-tahoe
6cac9c479c macfuse: slew of updates
various updates to improve the functionality of the mac fuse plugin


1. caching

previously, the experimental tahoefuse plugin pre-loaded the whole
structure of the specified mount into memory at launch time. changes
which were made through that fuse plugin would be remembered, but any
changes made through other tahoe clients would not be reflected.

now directory contents are only loaded when needed, and the data is
cached for a limited time.  any use of Directory objects should first
call maybe_refresh() which will check the time since the cache was last
loaded, and if the data is older than some validity period (currently
26s) then the directory's contents will be refetched and reloaded.
this replaces the 'load_dir()' method of TFS

whenever a local change is made to a Directory object, or when the
aforementioned cache reloading notices a change in directory data, the
mtime of the directory is automatically updated.
 

2. stat / metadata

the retrieval of 'stat' information for getattr(), and the way that
metadata is handled, has been refactored to better reflect the fact that
metadata in tahoe is only represented by 'edges' (i.e entries in 
directories) not on 'nodes' (files or directories themselves) hence a 
stat lookup should be a query to the parent directory (specifically the 
parent specified by the path being queried in the case that a node has 
multiple parents) for details known by that directory for the given 
child, rather than a query to the child itself.

the TStat utility class for returning stat information to the python-
fuse layer has been extended to accept a 'metadata' argument in its
constructor.  any fields found in the metadata dict which match the
names of the stat attributes are loaded into the TStat object.  the 
'ctime' and 'mtime' attributes are translated to st_ctime and st_mtime
to mesh with the existing timestamp handling code. any fields specified
by kwargs to the constructor override things that might be loaded from
the metadata dict.

Directory objects now track their children as a dict mapping name to 
(child_obj, metadata) tuples. This is because the metadata in tahoe
will be stored exclusively on the edges of the graph. each Directory
maintains its own mtime however, and get_stat() calls will report the
mtime of a directory based on the last modification of the Directory 
object, not based on any mtime records from the parent directory's 
metadata for that child.  This addresses the fact that since directories
may be shared, a given parent may or may not reflect the latest changes,
however one of the Finder's behaviours is to examine the stat of a
directory, and not to bother doing a readdir() if the stat is unchanged.
i.e. unless directories report their changes in their stat info, the
Finder will not show changes within that directory.


3. refactoring

reporting of many error codes has been refactored to raise IOError
subclasses with the appropriate errno.  this exploits python-fuse's
built-in mechanism for catching IOError and reporting the errno
embedded within it automatically, while simplifying the code within
the plugin.

the add_child() method on TFS was removed in favour of simply having an
add_child() method on Directory objects. this provides a more OO
approach in that Directory is responsible for maintaining its own in
memory state and also writing changes back to the node.  similarly for
remove_child()

these changes, along with the new tfs.compose_url() method, 
significantly simplify and improve readability of mkdir, rename methods
along with the newer link and unlink.  these also get improved error
reporting.

various operations (chmod, chown, truncate, utime) are now ignored.
previously they would report an unsupported operation (EOPNOTSUPP)
but now are simply logged and ignored.  this surpresses errors caused
by some client programs which try to use these operations, but at the
moment those operations are meaningless to the tahoe filesystem anyway.


4. link / unlink / rmdir

link, symlink calls are now supported, though with semantics differing
from posix, both equivalent.  unlink, rmdir calls are now supported, 
also equivalent.

link or symlink calls duplicate the uri of the named source and adds it
as a child of another directory according to the destination path.  for
directories, this creates a 'hard' link, i.e. the same directory will
appear in multiple locations within the filesystem, and changes in 
any place will be reflected everywhere.  for files, by contrast, since
the uri being duplicated is an immutable CHK uri, link/symlink for files
is equivalent to a copy - though significantly cheaper. (a file copy
with the fuse plugin is likely to cause a new file to be written and
uploaded, the link command simply adds an entry referring to an
existing uri)

in testing, the 'ln' command is unable to make hard links (i.e. call
link()) for directories, though symlink ('ln -s') is supported. 
either forms works equivalently for files.

unlink and rmdir both remove the specified entry from its parent
directory.


5. logging

the 'tfuse.log' file now only reports launches of the fuse plugin. once
the plugin has parsed the options, it reopens the log file with the
name of the mount, e.g. tfuse.root_dir.log, so that multiple instances
running concurrently will not interfere with each others' logging.


6. bug fixes

the tmp_file in the cache dir backing files opened for write was
intermittently failing to open the file.  added O_CREAT to the os.open
call so that files will be created if missing, not throw errors.

a failure to correctly parse arguments if no mount (dir_cap) name was
given but also no fuse options were given has been fixed. now the
command 'tahoe fuse mountpoint' will correctly default to root_dir
also when running from source, arguments to tahoefuse were not handled
to correctly match the 'tahoe fuse ...' behaviour.
2008-02-29 20:12:41 -07:00
Brian Warner
23de3e32d6 client.py: remove confusing no-longer-used code from get_encoding_parameters 2008-02-29 20:01:54 -07:00
Brian Warner
93d3960d4d upload: fix up some log messages 2008-02-29 20:00:45 -07:00
Zooko O'Whielacronx
30c9b21d6b wui/wapi/webish: HTML form checkboxes send the value "on", so let's interpret that as boolean true 2008-02-29 20:29:42 -07:00
Zooko O'Whielacronx
99f006c584 wapi: add POST /uri/$DIRECTORY?t=set_children
Unfinished bits: doc in webapi.txt, test handling of badly formed JSON, return reasonable HTTP response, examination of the effect of this patch on code coverage -- but I'm committing it anyway because MikeB can use it and I'm being called to dinner...
2008-02-29 18:40:27 -07:00
Zooko O'Whielacronx
5cdc678d24 docs: fix example JSON in webapi.txt to be legal JSON. ;-) 2008-02-29 18:39:25 -07:00