Change the logic of locking

if any on going opearation is seen,we
have to return Abort error message

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2019-09-12 10:23:37 +05:30
committed by mergify[bot]
parent 18151e9ca8
commit 6aac399075
9 changed files with 214 additions and 122 deletions

View File

@ -74,6 +74,8 @@ func NewControllerServer(d *csicommon.CSIDriver, cachePersister util.CachePersis
return &ControllerServer{
DefaultControllerServer: csicommon.NewDefaultControllerServer(d),
MetadataStore: cachePersister,
VolumeLocks: util.NewVolumeLocks(),
SnapshotLocks: util.NewVolumeLocks(),
}
}
@ -90,6 +92,7 @@ func NewNodeServer(d *csicommon.CSIDriver, containerized bool, t string) (*NodeS
return &NodeServer{
DefaultNodeServer: csicommon.NewDefaultNodeServer(d, t),
mounter: mounter,
VolumeLocks: util.NewVolumeLocks(),
}, nil
}