From b1a3a304cb0e0104de1c79196862145009a1d2d3 Mon Sep 17 00:00:00 2001 From: caoxianfei1 Date: Thu, 23 Nov 2023 14:15:56 +0800 Subject: [PATCH] fix/(curveadm-deploy): create pool need calc chunkservers Signed-off-by: caoxianfei1 --- cli/command/deploy.go | 2 ++ cli/command/scale_out.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cli/command/deploy.go b/cli/command/deploy.go index 69182cf11..a193d88f3 100644 --- a/cli/command/deploy.go +++ b/cli/command/deploy.go @@ -252,10 +252,12 @@ func genDeployPlaybook(curveadm *cli.CurveAdm, if step == CREATE_PHYSICAL_POOL { options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_PHYSICAL options[comm.KEY_POOLSET] = poolset + options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs) } else if step == CREATE_LOGICAL_POOL { options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_LOGICAL options[comm.POOLSET] = poolset options[comm.POOLSET_DISK_TYPE] = diskType + options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs) } pb.AddStep(&playbook.PlaybookStep{ diff --git a/cli/command/scale_out.go b/cli/command/scale_out.go index aee6567a7..5e703b056 100644 --- a/cli/command/scale_out.go +++ b/cli/command/scale_out.go @@ -339,6 +339,8 @@ func genScaleOutPlaybook(curveadm *cli.CurveAdm, options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_PHYSICAL options[comm.KEY_SCALE_OUT_CLUSTER] = dcs2scaleOut options[comm.KEY_NEW_TOPOLOGY_DATA] = data + options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs) + + calcNumOfChunkserver(curveadm, dcs2scaleOut) options[comm.KEY_POOLSET] = poolset case CREATE_LOGICAL_POOL: options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_LOGICAL