mirror of
https://github.com/minio/minio.git
synced 2025-04-16 08:58:11 -04:00
fix: validate deployment id when adding peer clusters (#15591)
Fixes: #15573
This commit is contained in:
parent
1fd72d5aea
commit
b1b6264bea
@ -360,6 +360,9 @@ func (c *SiteReplicationSys) AddPeerClusters(ctx context.Context, psites []madmi
|
|||||||
nonLocalPeerWithBuckets = v.Name
|
nonLocalPeerWithBuckets = v.Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if selfIdx == -1 {
|
||||||
|
return madmin.ReplicateAddStatus{}, errSRBackendIssue(fmt.Errorf("global deployment ID %s mismatch, expected one of %s", globalDeploymentID, deploymentIDsSet))
|
||||||
|
}
|
||||||
if !currDeploymentIDsSet.IsEmpty() {
|
if !currDeploymentIDsSet.IsEmpty() {
|
||||||
// If current cluster is already SR enabled and no new site being added ,fail.
|
// If current cluster is already SR enabled and no new site being added ,fail.
|
||||||
if currDeploymentIDsSet.Equals(deploymentIDsSet) {
|
if currDeploymentIDsSet.Equals(deploymentIDsSet) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user