[tahoe-lafs-trac-stream] [tahoe-lafs] #1643: presence of MDMF in aliases break the CLI < v1.9.0
tahoe-lafs
trac at tahoe-lafs.org
Thu Dec 20 17:48:00 UTC 2012
#1643: presence of MDMF in aliases break the CLI < v1.9.0
-------------------------+-------------------------------------------------
Reporter: zooko | Owner: davidsarah
Type: defect | Status: assigned
Priority: major | Milestone: 1.10.0
Component: code- | Version: 1.9.0
mutable | Keywords: versioning forward-compatibility
Resolution: | backward-compatibility mutable mdmf aliases
Launchpad Bug: | error
-------------------------+-------------------------------------------------
Old description:
> I created some MDMF dirs and put them into {{{~/.tahoe/private/aliases}}}
> with a recent trunk snapshot (very likely it behaves the same as 1.9.0
> does in this respect). Later I switched to Tahoe-LAFS v.1.8.3, and the
> CLI stopped working. Moving the {{{aliases}}} file aside fixes it, and
> putting the {{{aliases}}} file back breaks it again
> {{{
> $ tahoe mkdir
> Traceback (most recent call last):
> File "/home/zooko/playground/tahoe-lafs/1.8.3/support/bin/tahoe", line
> 9, in <module>
> load_entry_point('allmydata-tahoe==1.8.3', 'console_scripts',
> 'tahoe')()
> File "/home/zooko/playground/tahoe-
> lafs/1.8.3/src/allmydata/scripts/runner.py", line 113, in run
> rc = runner(sys.argv[1:], install_node_control=install_node_control)
> File "/home/zooko/playground/tahoe-
> lafs/1.8.3/src/allmydata/scripts/runner.py", line 67, in runner
> config.parseOptions(argv)
> File "/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7
> -linux-x86_64.egg/twisted/python/usage.py", line 231, in parseOptions
> self.subOptions.parseOptions(rest)
> File "/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7
> -linux-x86_64.egg/twisted/python/usage.py", line 241, in parseOptions
> self.postOptions()
> File "/home/zooko/playground/tahoe-
> lafs/1.8.3/src/allmydata/scripts/cli.py", line 46, in postOptions
> aliases = get_aliases(self['node-directory'])
> File "/home/zooko/playground/tahoe-
> lafs/1.8.3/src/allmydata/scripts/common.py", line 105, in get_aliases
> aliases[name] = uri.from_string_dirnode(cap).to_string()
> File "/home/zooko/playground/tahoe-lafs/1.8.3/src/allmydata/uri.py",
> line 692, in from_string_dirnode
> assert IDirnodeURI.providedBy(u)
> AssertionError
> $ mv ~/.tahoe/private/aliases ~/.tahoe/private/1.9-aliases
> $ tahoe mkdir
> URI:DIR2:CENSORED
> $ tahoe --version
> allmydata-tahoe: 1.8.3,
> foolscap: 0.6.1,
> pycryptopp: 0.5.29-r774,
> zfec: 1.4.5,
> Twisted: 11.0.0,
> Nevow: 0.10.0,
> zope.interface: unknown,
> python: 2.7.1+,
> platform: Linux-Ubuntu_11.04-x86_64-64bit_ELF,
> pyOpenSSL: 0.10,
> simplejson: 2.1.2,
> pycrypto: 2.4.1,
> pyasn1: unknown,
> mock: 0.8.0beta3,
> sqlite3: 2.6.0 [sqlite 3.7.4],
> setuptools: 0.6c16dev3
> }}}
New description:
I created some MDMF dirs and put them into {{{~/.tahoe/private/aliases}}}
with a recent trunk snapshot (very likely it behaves the same as 1.9.0
does in this respect). Later I switched to Tahoe-LAFS v.1.8.3, and the CLI
stopped working. Moving the {{{aliases}}} file aside fixes it, and putting
the {{{aliases}}} file back breaks it again
{{{
$ tahoe mkdir
Traceback (most recent call last):
File "/home/zooko/playground/tahoe-lafs/1.8.3/support/bin/tahoe", line
9, in <module>
load_entry_point('allmydata-tahoe==1.8.3', 'console_scripts',
'tahoe')()
File "/home/zooko/playground/tahoe-
lafs/1.8.3/src/allmydata/scripts/runner.py", line 113, in run
rc = runner(sys.argv[1:], install_node_control=install_node_control)
File "/home/zooko/playground/tahoe-
lafs/1.8.3/src/allmydata/scripts/runner.py", line 67, in runner
config.parseOptions(argv)
File "/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7-linux-
x86_64.egg/twisted/python/usage.py", line 231, in parseOptions
self.subOptions.parseOptions(rest)
File "/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7-linux-
x86_64.egg/twisted/python/usage.py", line 241, in parseOptions
self.postOptions()
File "/home/zooko/playground/tahoe-
lafs/1.8.3/src/allmydata/scripts/cli.py", line 46, in postOptions
aliases = get_aliases(self['node-directory'])
File "/home/zooko/playground/tahoe-
lafs/1.8.3/src/allmydata/scripts/common.py", line 105, in get_aliases
aliases[name] = uri.from_string_dirnode(cap).to_string()
File "/home/zooko/playground/tahoe-lafs/1.8.3/src/allmydata/uri.py",
line 692, in from_string_dirnode
assert IDirnodeURI.providedBy(u)
AssertionError
$ mv ~/.tahoe/private/aliases ~/.tahoe/private/1.9-aliases
$ tahoe mkdir
URI:DIR2:CENSORED
$ tahoe --version
allmydata-tahoe: 1.8.3,
foolscap: 0.6.1,
pycryptopp: 0.5.29-r774,
zfec: 1.4.5,
Twisted: 11.0.0,
Nevow: 0.10.0,
zope.interface: unknown,
python: 2.7.1+,
platform: Linux-Ubuntu_11.04-x86_64-64bit_ELF,
pyOpenSSL: 0.10,
simplejson: 2.1.2,
pycrypto: 2.4.1,
pyasn1: unknown,
mock: 0.8.0beta3,
sqlite3: 2.6.0 [sqlite 3.7.4],
setuptools: 0.6c16dev3
}}}
--
Comment (by warner):
Sounds good: the CLI code should refrain from asserting
`IDirectoryNode`-ness during the initial load of the aliases file, but we
should add a new `IDirectoryNode`-ness check on the particular alias that
gets used in a directory-like context (to avoid sending an invalid URL to
the WAPI).
We could talk about deferring this judgement to the node itself (sending
any old thing in the URL, and letting the node decide whether it's a
directory URI or not), which would tolerate version skew between the CLI
and the node better, possibly at the expense of worse error messages.
If davidsarah doesn't fix something by this weekend, I'll give it a shot.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1643#comment:11>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list