This should now fail quickly (during "tahoe start"). Previously this
would silently treat an unparseable size as "0", and the only way to
discover that it had had a problem would be to look at the foolscap log,
or examine the storage-service web page for the unexpected "Reserved
Size" number.
storedir = os.path.join(self.basedir, self.STOREDIR)
data = self.get_config("storage", "reserved_space", None)
- reserved = None
try:
reserved = parse_abbreviated_size(data)
except ValueError:
log.msg("[storage]reserved_space= contains unparseable value %s"
% data)
+ raise
if reserved is None:
reserved = 0
discard = self.get_config("storage", "debug_discard", False,
"[storage]\n" + \
"enabled = true\n" + \
"reserved_space = bogus\n")
- c = client.Client(basedir)
- self.failUnlessEqual(c.getServiceNamed("storage").reserved_space, 0)
+ self.failUnlessRaises(ValueError, client.Client, basedir)
def _permute(self, sb, key):
return [ s.get_longname() for s in sb.get_servers_for_psi(key) ]