diff --git a/.nancy-ignore b/.nancy-ignore index 58a249af8..28eb67a71 100644 --- a/.nancy-ignore +++ b/.nancy-ignore @@ -2,3 +2,5 @@ CVE-2020-26160 CVE-2020-15136 CVE-2020-15115 CVE-2020-15114 +CVE-2022-2835 +CVE-2022-2837 diff --git a/cmd/site-replication.go b/cmd/site-replication.go index e63514010..30304947e 100644 --- a/cmd/site-replication.go +++ b/cmd/site-replication.go @@ -2005,7 +2005,7 @@ func (c *SiteReplicationSys) isEnabled() bool { return c.enabled } -var errMissingSRConfig = fmt.Errorf("Site not found in site replication configuration") +var errMissingSRConfig = fmt.Errorf("unable to find site replication configuration") // RemovePeerCluster - removes one or more clusters from site replication configuration. func (c *SiteReplicationSys) RemovePeerCluster(ctx context.Context, objectAPI ObjectLayer, rreq madmin.SRRemoveReq) (st madmin.ReplicateRemoveStatus, err error) { @@ -2057,7 +2057,8 @@ func (c *SiteReplicationSys) RemovePeerCluster(ctx context.Context, objectAPI Ob return } if _, err = admClient.SRPeerRemove(ctx, rreq); err != nil { - if errors.As(err, &errMissingSRConfig) { + if errors.Is(err, errMissingSRConfig) { + // ignore if peer is already removed. return } errs[pi.DeploymentID] = errSRPeerResp(fmt.Errorf("unable to update peer %s: %w", pi.Name, err))