mirror of
https://github.com/minio/minio.git
synced 2025-01-26 14:13:16 -05:00
fix: ForceUnlock should unlock everywhere (#12542)
This commit is contained in:
parent
14bb969782
commit
bcea72ee8a
@ -415,21 +415,19 @@ func (a adminAPIHandlers) ForceUnlockHandler(w http.ResponseWriter, r *http.Requ
|
|||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
|
|
||||||
var args dsync.LockArgs
|
var args dsync.LockArgs
|
||||||
lockersMap := make(map[string]dsync.NetLocker)
|
var lockers []dsync.NetLocker
|
||||||
for _, path := range strings.Split(vars["paths"], ",") {
|
for _, path := range strings.Split(vars["paths"], ",") {
|
||||||
if path == "" {
|
if path == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
args.Resources = append(args.Resources, path)
|
args.Resources = append(args.Resources, path)
|
||||||
lockers, _ := z.serverPools[0].getHashedSet(path).getLockers()
|
|
||||||
for _, locker := range lockers {
|
|
||||||
if locker != nil {
|
|
||||||
lockersMap[locker.String()] = locker
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, locker := range lockersMap {
|
for _, lks := range z.serverPools[0].erasureLockers {
|
||||||
|
lockers = append(lockers, lks...)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, locker := range lockers {
|
||||||
locker.ForceUnlock(ctx, args)
|
locker.ForceUnlock(ctx, args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user