mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: tier addition validation (#18136)
This commit is contained in:
parent
f29522269d
commit
e101eeeda9
@ -49,7 +49,7 @@ const probeObject = "probeobject"
|
||||
// to perform all operations defined in the WarmBackend interface.
|
||||
func checkWarmBackend(ctx context.Context, w WarmBackend) error {
|
||||
var empty bytes.Reader
|
||||
_, err := w.Put(ctx, probeObject, &empty, 0)
|
||||
remoteVersionID, err := w.Put(ctx, probeObject, &empty, 0)
|
||||
if err != nil {
|
||||
if _, ok := err.(BackendDown); ok {
|
||||
return err
|
||||
@ -78,7 +78,7 @@ func checkWarmBackend(ctx context.Context, w WarmBackend) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
if err = w.Remove(ctx, probeObject, ""); err != nil {
|
||||
if err = w.Remove(ctx, probeObject, remoteVersionID); err != nil {
|
||||
if _, ok := err.(BackendDown); ok {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user