mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Move admin APIs to new path and add redesigned heal APIs (#5351)
- Changes related to moving admin APIs
- admin APIs now have an endpoint under /minio/admin
- admin APIs are now versioned - a new API to server the version is
added at "GET /minio/admin/version" and all API operations have the
path prefix /minio/admin/v1/<operation>
- new service stop API added
- credentials change API is moved to /minio/admin/v1/config/credential
- credentials change API and configuration get/set API now require TLS
so that credentials are protected
- all API requests now receive JSON
- heal APIs are disabled as they will be changed substantially
- Heal API changes
Heal API is now provided at a single endpoint with the ability for a
client to start a heal sequence on all the data in the server, a
single bucket, or under a prefix within a bucket.
When a heal sequence is started, the server returns a unique token
that needs to be used for subsequent 'status' requests to fetch heal
results.
On each status request from the client, the server returns heal result
records that it has accumulated since the previous status request. The
server accumulates upto 1000 records and pauses healing further
objects until the client requests for status. If the client does not
request any further records for a long time, the server aborts the
heal sequence automatically.
A heal result record is returned for each entity healed on the server,
such as system metadata, object metadata, buckets and objects, and has
information about the before and after states on each disk.
A client may request to force restart a heal sequence - this causes
the running heal sequence to be aborted at the next safe spot and
starts a new heal sequence.
This commit is contained in:
committed by
Harshavardhana
parent
f3f09ed14e
commit
a337ea4d11
@@ -497,6 +497,17 @@ func resetGlobalStorageEnvs() {
|
||||
globalRRStorageClass = storageClass{}
|
||||
}
|
||||
|
||||
// reset global heal state
|
||||
func resetGlobalHealState() {
|
||||
globalAllHealState.Lock()
|
||||
defer globalAllHealState.Unlock()
|
||||
for _, v := range globalAllHealState.healSeqMap {
|
||||
if !v.hasEnded() {
|
||||
v.stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Resets all the globals used modified in tests.
|
||||
// Resetting ensures that the changes made to globals by one test doesn't affect others.
|
||||
func resetTestGlobals() {
|
||||
@@ -518,6 +529,8 @@ func resetTestGlobals() {
|
||||
resetGlobalIsEnvs()
|
||||
// Reset global storage class flags
|
||||
resetGlobalStorageEnvs()
|
||||
// Reset global heal state
|
||||
resetGlobalHealState()
|
||||
}
|
||||
|
||||
// Configure the server for the test run.
|
||||
|
||||
Reference in New Issue
Block a user