[tahoe-lafs-trac-stream] [tahoe-lafs] #1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles with the regex it uses)
tahoe-lafs
trac at tahoe-lafs.org
Wed Sep 19 03:24:39 UTC 2012
#1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles
with the regex it uses)
-------------------------------------------------+-------------------------
Reporter: davidsarah | Owner:
Type: defect | davidsarah
Priority: normal | Status: new
Component: code | Milestone: soon
Keywords: reserved_space storage error | Version: 1.9.2
usability | Launchpad Bug:
-------------------------------------------------+-------------------------
stercor tried to use "{{{reserved_space = 1.5TiB}}}" in {{{tahoe.cfg}}}.
This failed and used a {{{reserved_space}}} of 0 bytes (as shown on the
server status page), because {{{T}}} is not recognized by
[source:git/src/allmydata/util/abbreviate.py at 39a41f1d#L58
parse_abbreviated_size in allmydata.util.abbreviate].
Note that the error due to an unparseable size is silent and only reported
in the foolscap log. Continuing with a {{{reserved_space}}} of 0 bytes is
a rather unhelpful failure mode. The code responsible for that is at
[source:git/src/allmydata/client.py at 32377469#L248].
The regex is {{{r"^(\d+)([kKmMgG]?[iB]?[bB]?)$"}}}, which also allows
strings ending in {{{"BB"}}} or {{{"Bb"}}}; I don't think that allowing
the repeated B was intentional.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1812>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list