mirror of
https://github.com/minio/minio.git
synced 2025-11-24 03:27:44 -05:00
Added clear subcommand for control lock (#3013)
Added clear subcommand for control lock with following options:
```
3. Clear lock named 'bucket/object' (exact match).
$ minio control lock clear http://localhost:9000/bucket/object
4. Clear all locks with names that start with 'bucket/prefix' (wildcard match).
$ minio control lock --recursive clear http://localhost:9000/bucket/prefix
5. Clear all locks older than 10minutes.
$ minio control lock --older-than=10m clear http://localhost:9000/
6. Clear all locks with names that start with 'bucket/a' and that are older than 1hour.
$ minio control lock --recursive --older-than=1h clear http://localhost:9000/bucket/a
```
This commit is contained in:
@@ -261,7 +261,7 @@ func (c *controlAPIHandlers) ServiceHandler(args *ServiceArgs, reply *ServiceRep
|
||||
return nil
|
||||
}
|
||||
|
||||
// LockInfo - RPC control handler for `minio control lock`. Returns the info of the locks held in the system.
|
||||
// TryInitHandler - generic RPC control handler
|
||||
func (c *controlAPIHandlers) TryInitHandler(args *GenericArgs, reply *GenericReply) error {
|
||||
if !isRPCTokenValid(args.Token) {
|
||||
return errInvalidToken
|
||||
|
||||
Reference in New Issue
Block a user