Skip to content

Commit 6dd6faa

Browse files
add toggling disaster recovery support to cli
1 parent a14f71f commit 6dd6faa

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

simplyblock_core/cluster_ops.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,16 @@ def cluster_toggle_disaster_recovery_status(cl_id, disaster_recovery):
362362

363363
snodes = db_controller.get_storage_nodes_by_cluster_id(cl_id)
364364

365-
# TODO: get distribs of each snode
366-
return False
365+
for node in snodes:
366+
rpc_client = RPCClient(
367+
node.mgmt_ip, node.rpc_port,
368+
node.rpc_username, node.rpc_password, timeout=5, retry=2)
369+
370+
for bdev in node.lvstore_stack:
371+
if bdev['type'] == "bdev_distr":
372+
rpc_client.bdev_distrib_toggle_disaster_recovery_status(bdev['name'], disaster_recovery)
373+
374+
return True
367375

368376

369377
def cluster_activate(cl_id, force=False, force_lvstore_create=False):

simplyblock_core/env_var

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SIMPLY_BLOCK_COMMAND_NAME=sbcli-storage-tiering
2-
SIMPLY_BLOCK_VERSION=12.2.8
2+
SIMPLY_BLOCK_VERSION=12.2.9
33

44
SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:storage-tiering
55
DOCKER_USER=hamdysimplyblock

0 commit comments

Comments
 (0)