Remove site replication config if it succeeded locally (#16279)

This commit is contained in:
Poorna
2022-12-22 01:31:20 -08:00
committed by GitHub
parent 1dd8f0e8f3
commit 6423e4c767
5 changed files with 39 additions and 13 deletions

View File

@@ -131,8 +131,8 @@ func validateReplicationDestination(ctx context.Context, bucket string, rCfg *re
}
}
// validate replication ARN against target endpoint
c, ok := globalBucketTargetSys.arnRemotesMap[arnStr]
if ok {
c := globalBucketTargetSys.GetRemoteTargetClient(ctx, arnStr)
if c != nil {
if c.EndpointURL().String() == clnt.EndpointURL().String() {
selfTarget, _ := isLocalHost(clnt.EndpointURL().Hostname(), clnt.EndpointURL().Port(), globalMinioPort)
if !sameTarget {