[tahoe-lafs-trac-stream] [Tahoe-LAFS] #4155: parse_duration() doesn't understand seconds

Tahoe-LAFS trac at tahoe-lafs.org
Wed Jan 8 18:46:04 UTC 2025


#4155: parse_duration() doesn't understand seconds
---------------------+---------------------------
 Reporter:  meejah   |          Owner:
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:  undecided
Component:  unknown  |        Version:  n/a
 Keywords:           |  Launchpad Bug:
---------------------+---------------------------
 User https://github.com/sgerodes on GitHub reports:

 configuring seconds in override_lease_duration previously resulted in
 errors due to missing elif statement in the parse_duration function

 This configuration

 {{{
 [storage]
 expire.enabled = True
 expire.mode = age
 expire.override_lease_duration = 100000s
 }}}

 Results in this error

 {{{
 Unknown error, here's the traceback:
 2025-01-08T15:45:43.031716337Z Traceback (most recent call last):
 2025-01-08T15:45:43.031717379Z   File "/usr/local/lib/python3.10/dist-
 packages/twisted/internet/defer.py", line 2017, in _inlineCallbacks
 2025-01-08T15:45:43.031938379Z     result = context.run(gen.send, result)
 2025-01-08T15:45:43.031945545Z   File "/usr/local/lib/python3.10/dist-
 packages/allmydata/client.py", line 306, in create_client_from_config
 2025-01-08T15:45:43.032061629Z
 client.init_storage(storage_plugins.announceable_storage_servers)
 2025-01-08T15:45:43.032064420Z   File "/usr/local/lib/python3.10/dist-
 packages/allmydata/client.py", line 843, in init_storage
 2025-01-08T15:45:43.032065504Z     ss =
 self.get_anonymous_storage_server()
 2025-01-08T15:45:43.032066462Z   File "/usr/local/lib/python3.10/dist-
 packages/allmydata/client.py", line 806, in get_anonymous_storage_server
 2025-01-08T15:45:43.032067462Z     o_l_d = parse_duration(o_l_d)
 2025-01-08T15:45:43.032068212Z   File "/usr/local/lib/python3.10/dist-
 packages/allmydata/util/time_format.py", line 74, in parse_duration
 2025-01-08T15:45:43.032069170Z     raise ValueError("no unit (like day,
 month, or year) in '%s'" % orig)
 2025-01-08T15:45:43.032070045Z builtins.ValueError: no unit (like day,
 month, or year) in '100000s'
 }}}

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


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