mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
rbd: protect against concurrent gRPC calls
The timeout value in external-provisioner is fairly low. It's not uncommon that it times out and retries before the rbdplugin is done with CreateVolume. rbdplugin has to serialize calls and ensure that they are idempotent to deal with this.
This commit is contained in:
committed by
Huamin Chen
parent
188cdd1d68
commit
403cad682c
@ -75,7 +75,19 @@ type rbdSnapshot struct {
|
||||
}
|
||||
|
||||
var (
|
||||
// serializes operations based on "<rbd pool>/<rbd image>" as key
|
||||
attachdetachMutex = keymutex.NewKeyMutex()
|
||||
// serializes operations based on "volume name" as key
|
||||
volumeNameMutex = keymutex.NewKeyMutex()
|
||||
// serializes operations based on "volume id" as key
|
||||
volumeIDMutex = keymutex.NewKeyMutex()
|
||||
// serializes operations based on "snapshot name" as key
|
||||
snapshotNameMutex = keymutex.NewKeyMutex()
|
||||
// serializes operations based on "snapshot id" as key
|
||||
snapshotIDMutex = keymutex.NewKeyMutex()
|
||||
// serializes operations based on "mount target path" as key
|
||||
targetPathMutex = keymutex.NewKeyMutex()
|
||||
|
||||
supportedFeatures = sets.NewString("layering")
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user