minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

fix validation in replicate rm to allow stale target cleanup #4838

Closed poornas closed 9 months ago

poornas commented 9 months ago

when --all --force is specified, send request to server even if replication config is not found to allow stale target cleanup

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers under the terms of the Apache 2 license. By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.

Description

Motivation and Context

proper cleanup of partially created replication config.

How to test this PR?

need a 2022 mc version which allowed separate remote target creation before use in replication rule. add a target, then use latest to mc replicate rm --all --force on a bucket where repl.config is not configured. It should clean up all targets for the bucket (see mc admin bucket remote ls output of older mc)

Types of changes

Checklist: