#2926 closed defect (fixed)
`tahoe status` unhandled KeyError: 'progress'
Reported by: | exarkun | Owned by: | GitHub <noreply@…> |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | code-frontend-cli | Version: | |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
$ tahoe status Statistics (for last 2 seconds): uploaded 0 B in 0 files downloaded 0 B in 0 files Active operations: ╓ type ╥ storage index ╥ progress ╥ status message ╟───────╫────────────────────────────╫────────────────────────╫───────────────────── 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 "site-packages/twisted/_threads/_threadworker.py", line 46, in work task() File "site-packages/twisted/_threads/_team.py", line 190, in doWork task() --- <exception caught here> --- File "site-packages/twisted/python/threadpool.py", line 250, in inContext result = inContext.theWork() File "site-packages/twisted/python/threadpool.py", line 266, in <lambda> inContext.theWork = lambda: context.call(ctx, func, *args, **kw) File "site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) File "tahoe-lafs/src/allmydata/scripts/cli.py", line 579, in status return tahoe_status.do_status(options) File "tahoe-lafs/src/allmydata/scripts/tahoe_status.py", line 146, in do_status total = op['progress'] exceptions.KeyError: 'progress'
This is moderately reproduceable against my client node. Hacking the code a bit, I see that when it occurs, op (at least sometimes) is:
{u'mode': u'MODE_READ', u'status': u'Sending 1 initial queries', u'storage-index-string': u'vfl23nfdydohpriimglb7dynje', u'total-size': u'-NA-', u'type': u'mapupdate'}
Change History (4)
comment:1 Changed at 2018-05-23T15:58:56Z by exarkun
comment:2 Changed at 2018-05-23T18:01:12Z by exarkun
- Keywords review-needed added
comment:3 Changed at 2018-05-28T12:38:45Z by GitHub <noreply@…>
- Owner set to GitHub <noreply@…>
- Resolution set to fixed
- Status changed from new to closed
In 28a2e6e/trunk:
comment:4 Changed at 2018-05-28T13:01:50Z by exarkun
- Keywords review-needed removed
Note: See
TracTickets for help on using
tickets.
From the implementation of allmydata.web.status.Status it looks like only IDownloadStatus items have a "progress" key. The CLI-side rendering code assumes that if "progress-hash" is not present then "progress" will be. However, there are six cases represented by the Status renderer. And, indeed, "mapupdate" is one of those other cases.
So, the CLI-side rendering code needs to support these other cases as well.