[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2879: 'magic-folder create' should also create the target local directory

Tahoe-LAFS trac at tahoe-lafs.org
Thu Jun 22 05:37:37 UTC 2017


#2879: 'magic-folder create' should also create the target local directory
--------------------------+---------------------------
 Reporter:  cypher        |          Owner:
     Type:  defect        |         Status:  new
 Priority:  normal        |      Milestone:  undecided
Component:  unknown       |        Version:  1.12.1
 Keywords:  magic-folder  |  Launchpad Bug:
--------------------------+---------------------------
 Running `tahoe magic-folder create magic: user ~/Magic-Folder` succeeds as
 expected, however running `tahoe restart` afterward will produce an
 exception with the following traceback as a result of the local directory
 not existing:

 {{{
 STOPPING '/home/user/.tahoe'
 process 2105 is dead
 STARTING '/home/user/.tahoe'
 starting node in '/home/user/.tahoe'
 Traceback (most recent call last):
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 319, in addCallback
     callbackKeywords=kw)
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 308, in addCallbacks
     self._runCallbacks()
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 651, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/home/user/code/tahoe-lafs/src/allmydata/scripts/runner.py", line
 145, in dispatch
     d = defer.maybeDeferred(f, so)
 --- <exception caught here> ---
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 150, in maybeDeferred
     result = f(*args, **kw)
   File "/home/user/code/tahoe-
 lafs/src/allmydata/scripts/startstop_node.py", line 244, in restart
     return start(config)
   File "/home/user/code/tahoe-
 lafs/src/allmydata/scripts/startstop_node.py", line 170, in start
     twistd.runApp(twistd_config)
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/scripts/twistd.py", line 25, in runApp
     _SomeApplicationRunner(config).run()
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/application/app.py", line 379, in run
     self.application = self.createOrGetApplication()
   File "/home/user/venvs/tahoe/local/lib/python2.7/site-
 packages/twisted/application/app.py", line 439, in createOrGetApplication
     ser = plg.makeService(self.config.subOptions)
   File "/home/user/code/tahoe-
 lafs/src/allmydata/scripts/startstop_node.py", line 78, in makeService
     return Client(self.basedir)
   File "/home/user/code/tahoe-lafs/src/allmydata/client.py", line 209, in
 __init__
     self.init_magic_folder()
   File "/home/user/code/tahoe-lafs/src/allmydata/client.py", line 586, in
 init_magic_folder
     downloader_delay=poll_interval,
   File "/home/user/code/tahoe-
 lafs/src/allmydata/frontends/magic_folder.py", line 83, in __init__
     self.uploader = Uploader(client, local_path_u, db, upload_dirnode,
 uploader_delay, clock)
   File "/home/user/code/tahoe-
 lafs/src/allmydata/frontends/magic_folder.py", line 341, in __init__
     QueueMixin.__init__(self, client, local_path_u, db, 'uploader', clock)
   File "/home/user/code/tahoe-
 lafs/src/allmydata/frontends/magic_folder.py", line 155, in __init__
     % quote_local_unicode_path(self._local_path_u))
 exceptions.AssertionError: The '[magic_folder] local.directory' parameter
 was '/home/user/Magic-Folder' but there is no directory at that location.
 }}}

 Since this behavior is likely to be surprising to many users -- and since
 there appears to be no meaningful advantage in having the user create the
 local directory manually -- consider modifying the behavior of `magic-
 folder create` to create the local directory automatically in the event
 that it doesn't already exist.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2879>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list