Skip to content

Commit 003ad85

Browse files
committed
fix/(curveadm-deploy): create pool need calc chunkservers
Signed-off-by: caoxianfei1 <[email protected]>
1 parent 2728b7d commit 003ad85

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cli/command/deploy.go

+2
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,12 @@ func genDeployPlaybook(curveadm *cli.CurveAdm,
252252
if step == CREATE_PHYSICAL_POOL {
253253
options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_PHYSICAL
254254
options[comm.KEY_POOLSET] = poolset
255+
options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs)
255256
} else if step == CREATE_LOGICAL_POOL {
256257
options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_LOGICAL
257258
options[comm.POOLSET] = poolset
258259
options[comm.POOLSET_DISK_TYPE] = diskType
260+
options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs)
259261
}
260262

261263
pb.AddStep(&playbook.PlaybookStep{

cli/command/scale_out.go

+2
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ func genScaleOutPlaybook(curveadm *cli.CurveAdm,
339339
options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_PHYSICAL
340340
options[comm.KEY_SCALE_OUT_CLUSTER] = dcs2scaleOut
341341
options[comm.KEY_NEW_TOPOLOGY_DATA] = data
342+
options[comm.KEY_NUMBER_OF_CHUNKSERVER] = calcNumOfChunkserver(curveadm, dcs) +
343+
calcNumOfChunkserver(curveadm, dcs2scaleOut)
342344
options[comm.KEY_POOLSET] = poolset
343345
case CREATE_LOGICAL_POOL:
344346
options[comm.KEY_CREATE_POOL_TYPE] = comm.POOL_TYPE_LOGICAL

0 commit comments

Comments
 (0)