Skip to content

Commit

Permalink
fix/(curveadm-deploy): create pool need calc chunkservers
Browse files Browse the repository at this point in the history
Signed-off-by: caoxianfei1 <[email protected]>
  • Loading branch information
caoxianfei1 committed Nov 23, 2023
1 parent 2728b7d commit 003ad85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/command/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions cli/command/scale_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 003ad85

Please sign in to comment.