Open atinmu opened 6 years ago
Draft design:
Instead of depending on Transaction to replay the steps when that node comes up, we can maintain a flag in Brick structure to differentiate provisioned vs unprovisioned brick.
Brick {
RootDevice string
VgName string
LvName string
Path string
Host string
Provisioned bool
}
During initial plan, in the first iteration plan using the list of online peers. If quorum bricks are available then look for devices from the list of offline peers. If the bricks are selected from offline peers mark the provisioned flag as false
. Transaction step will not try to create the brick if brick.Provisioned == false
.
Brick Start needs to be enhanced to check the above flag to decide that brick needs to be provisioned or not.
During Brick Start(During Volume start or Glusterd2 start or Volume set):
if !brick.Provisioned {
provisionBrick(brick)
brick.Provisioned = true
updateVolumeInfo() // After the brick.Provisioned change
}
generateBrickVolfile()
startBrick()
Changes required:
Notes:
@atinmu @oshankkumar @kshlm @amarts @Madhu-1 Let me know your thoughts.
In GD1's world, if one out of three nodes cluster go down all volume creation requests fail. In containers world, this becomes a bottleneck especially with intelligent volume provisioning. GD2 should be able to provide a capability where in such situation volume creation goes through. Once the glusterd service comes back on the pod, there should be a auto way to replay all the pending bricks provisioning on that pod.