|
|
@ -448,6 +448,12 @@ func (adminAPI adminAPIHandlers) ListUploadsHealHandler(w http.ResponseWriter, r |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Validate query params.
|
|
|
|
// Validate query params.
|
|
|
|
vars := r.URL.Query() |
|
|
|
vars := r.URL.Query() |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
@ -531,6 +537,12 @@ func (adminAPI adminAPIHandlers) ListObjectsHealHandler(w http.ResponseWriter, r |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Validate query params.
|
|
|
|
// Validate query params.
|
|
|
|
vars := r.URL.Query() |
|
|
|
vars := r.URL.Query() |
|
|
|
bucket, prefix, marker, delimiter, maxKey, adminAPIErr := extractListObjectsHealQuery(vars) |
|
|
|
bucket, prefix, marker, delimiter, maxKey, adminAPIErr := extractListObjectsHealQuery(vars) |
|
|
@ -567,6 +579,12 @@ func (adminAPI adminAPIHandlers) ListBucketsHealHandler(w http.ResponseWriter, r |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Get the list buckets to be healed.
|
|
|
|
// Get the list buckets to be healed.
|
|
|
|
bucketsInfo, err := objLayer.ListBucketsHeal() |
|
|
|
bucketsInfo, err := objLayer.ListBucketsHeal() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
@ -598,6 +616,12 @@ func (adminAPI adminAPIHandlers) HealBucketHandler(w http.ResponseWriter, r *htt |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Validate bucket name and check if it exists.
|
|
|
|
// Validate bucket name and check if it exists.
|
|
|
|
vars := r.URL.Query() |
|
|
|
vars := r.URL.Query() |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
@ -687,6 +711,12 @@ func (adminAPI adminAPIHandlers) HealObjectHandler(w http.ResponseWriter, r *htt |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vars := r.URL.Query() |
|
|
|
vars := r.URL.Query() |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
object := vars.Get(string(mgmtObject)) |
|
|
|
object := vars.Get(string(mgmtObject)) |
|
|
@ -745,6 +775,12 @@ func (adminAPI adminAPIHandlers) HealUploadHandler(w http.ResponseWriter, r *htt |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if this setup has an erasure coded backend.
|
|
|
|
|
|
|
|
if !globalIsXL { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vars := r.URL.Query() |
|
|
|
vars := r.URL.Query() |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
bucket := vars.Get(string(mgmtBucket)) |
|
|
|
object := vars.Get(string(mgmtObject)) |
|
|
|
object := vars.Get(string(mgmtObject)) |
|
|
@ -824,7 +860,7 @@ func (adminAPI adminAPIHandlers) HealFormatHandler(w http.ResponseWriter, r *htt |
|
|
|
// heal-format is only applicable to single node XL and
|
|
|
|
// heal-format is only applicable to single node XL and
|
|
|
|
// distributed XL setup.
|
|
|
|
// distributed XL setup.
|
|
|
|
if !globalIsXL { |
|
|
|
if !globalIsXL { |
|
|
|
writeErrorResponse(w, ErrNotImplemented, r.URL) |
|
|
|
writeErrorResponse(w, ErrHealNotImplemented, r.URL) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|