Exception when checking the running partitions
swh@swh-toolbox-64898ddb-dqlr2:~$ swh scrubber check running --config-id=9
WARNING:swh.core.sentry:Sentry DSN not provided, events will not be sent.
Running partitions for storage-hashes-directory [id=9, type=directory]:
Traceback (most recent call last):
File "/opt/swh/.local/bin/swh", line 8, in <module>
sys.exit(main())
File "/opt/swh/.local/lib/python3.10/site-packages/swh/core/cli/__init__.py", line 175, in main
return swh(auto_envvar_prefix="SWH")
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/swh/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/swh/.local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/swh/.local/lib/python3.10/site-packages/swh/scrubber/cli.py", line 377, in scrubber_check_running
f"({naturaldelta(now-running_since)})"
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
perhaps some helpful info:
- only one scrubber is running on the partition 3714
- a partition is waiting to be handled
swh-scrubber=> select * from checked_partition where config_id=9 and end_date is null;
config_id | partition_id | start_date | end_date
-----------+--------------+-------------------------------+----------
9 | 3931 | |
9 | 3714 | 2024-09-03 13:49:06.571553+00 |
(2 rows)
- the config:
[9] storage-hashes-directory: directory, 4096, storage:postgresql (user=guest password=xxx dbname=swh host=db1.internal.staging.swh.network port=5432)
Edited by Vincent Sellier