Skip to content

Commit

Permalink
Added check object_storage for orphaned_objects_command
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Unisikhin committed Dec 19, 2024
1 parent 4cfc0ac commit 5c0c0f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ch_tools/monrun_checks/ch_orphaned_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
OrphanedObjectsState,
)
from ch_tools.chadmin.internal.zookeeper import get_zk_node
from ch_tools.common.clickhouse.config.clickhouse import ClickhouseConfig
from ch_tools.common.result import CRIT, OK, WARNING, Result


Expand Down Expand Up @@ -46,6 +47,9 @@ def orphaned_objects_command(
) -> Result:
_check_mutually_exclusive(state_local, state_zk_path)

if not ClickhouseConfig.load().storage_configuration.has_disk("object_storage"):
return Result(OK, "Disabled")

try:
state = _get_orphaned_objects_state(ctx, state_local, state_zk_path)
except Exception as e:
Expand Down

0 comments on commit 5c0c0f7

Please sign in to comment.