tahoe backup crashes when an upload operation fails #2918

Open
opened 2018-04-10 15:41:09 +00:00 by exarkun · 0 comments

If tahoe backup attempts an upload and the client node it is using reports an error, the tahoe backup process crashes with an unhandled exception.

For example:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/twisted/_threads/_threadworker.py", line 46, in work
    task()
  File "/usr/lib/python2.7/site-packages/twisted/_threads/_team.py", line 190, in doWork
    task()
--- <exception caught here> ---
  File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/cli.py", line 543, in backup
    rc = tahoe_backup.backup(options)
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 326, in backup
    return bu.run()
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 118, in run
    new_backup_dircap = self.process(options.from_dir)
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 189, in process
    childcap = self.process(childpath)
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 195, in process
    childcap, metadata = self.upload(childpath)
  File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 306, in upload
    raise HTTPError("Error during file PUT", resp)
allmydata.scripts.common_http.HTTPError: Error during file PUT: 500 Internal Server Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 933, in start
    d = self.start_encrypted(eu)
  File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 960, in start_encrypted
    d.addCallback(self.locate_all_shareholders, started)
  File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 321, in addCallback
    callbackKeywords=kw)
  File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 310, in addCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 988, in locate_all_shareholders
    num_segments, n, k, desired)
  File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 264, in get_shareholders
    raise NoServersError("client gave us zero servers")
allmydata.interfaces.NoServersError: client gave us zero servers

The backup does not complete and the user is required to have a high level of technical expertise to understand what is happening.

Many such errors may be due to transient network conditions. In some cases, it may be worth trying again instead of crashing. In others, if the backup is going to end prematurely, this should be reported in a way more easily understood by the user.

If `tahoe backup` attempts an upload and the client node it is using reports an error, the `tahoe backup` process crashes with an unhandled exception. For example: ``` Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.7/site-packages/twisted/_threads/_threadworker.py", line 46, in work task() File "/usr/lib/python2.7/site-packages/twisted/_threads/_team.py", line 190, in doWork task() --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 250, in inContext result = inContext.theWork() File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 266, in <lambda> inContext.theWork = lambda: context.call(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/site-packages/allmydata/scripts/cli.py", line 543, in backup rc = tahoe_backup.backup(options) File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 326, in backup return bu.run() File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 118, in run new_backup_dircap = self.process(options.from_dir) File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 189, in process childcap = self.process(childpath) File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 195, in process childcap, metadata = self.upload(childpath) File "/usr/lib/python2.7/site-packages/allmydata/scripts/tahoe_backup.py", line 306, in upload raise HTTPError("Error during file PUT", resp) allmydata.scripts.common_http.HTTPError: Error during file PUT: 500 Internal Server Error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 933, in start d = self.start_encrypted(eu) File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 960, in start_encrypted d.addCallback(self.locate_all_shareholders, started) File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 321, in addCallback callbackKeywords=kw) File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 310, in addCallbacks self._runCallbacks() --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 988, in locate_all_shareholders num_segments, n, k, desired) File "/usr/lib/python2.7/site-packages/allmydata/immutable/upload.py", line 264, in get_shareholders raise NoServersError("client gave us zero servers") allmydata.interfaces.NoServersError: client gave us zero servers ``` The backup does not complete and the user is required to have a high level of technical expertise to understand what is happening. Many such errors may be due to transient network conditions. In some cases, it may be worth trying again instead of crashing. In others, if the backup is going to end prematurely, this should be reported in a way more easily understood by the user.
exarkun added the
code-frontend-cli
normal
defect
1.12.1
labels 2018-04-10 15:41:09 +00:00
exarkun added this to the undecided milestone 2018-04-10 15:41:09 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2918
No description provided.