Skip to content

Commit

Permalink
ceph: initialize rbd block pool after creation
Browse files Browse the repository at this point in the history
This is done in order to prevent deadlock when parallel
PVC create requests are issued on a new uninitialized
rbd block pool due to https://tracker.ceph.com/issues/52537.

Fixes: #8696

Signed-off-by: Rakshith R <rar@redhat.com>
  • Loading branch information
Rakshith-R committed Oct 6, 2021
1 parent 00cef45 commit fca8365
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/operator/ceph/pool/controller.go
Expand Up @@ -356,6 +356,12 @@ func createPool(context *clusterd.Context, clusterInfo *cephclient.ClusterInfo,
return errors.Wrapf(err, "failed to create pool %q", p.Name)
}

args := []string{"pool", "init", p.Name}
output, err := cephclient.NewRBDCommand(context, clusterInfo, args).Run()
if err != nil {
return errors.Wrapf(err, "failed to initialize replicated pool %q. %s", p.Name, string(output))
}

return nil
}

Expand Down

0 comments on commit fca8365

Please sign in to comment.