mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
avoid using errors.As for 'errors.New' use errors.Is (#15549)
Bonus: ignore coredns CVE, for now, there is no fix yet https://github.com/coredns/coredns/issues/5574
This commit is contained in:
parent
ac240a8477
commit
895357607a
@ -2,3 +2,5 @@ CVE-2020-26160
|
|||||||
CVE-2020-15136
|
CVE-2020-15136
|
||||||
CVE-2020-15115
|
CVE-2020-15115
|
||||||
CVE-2020-15114
|
CVE-2020-15114
|
||||||
|
CVE-2022-2835
|
||||||
|
CVE-2022-2837
|
||||||
|
@ -2005,7 +2005,7 @@ func (c *SiteReplicationSys) isEnabled() bool {
|
|||||||
return c.enabled
|
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.
|
// 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) {
|
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
|
return
|
||||||
}
|
}
|
||||||
if _, err = admClient.SRPeerRemove(ctx, rreq); err != nil {
|
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
|
return
|
||||||
}
|
}
|
||||||
errs[pi.DeploymentID] = errSRPeerResp(fmt.Errorf("unable to update peer %s: %w", pi.Name, err))
|
errs[pi.DeploymentID] = errSRPeerResp(fmt.Errorf("unable to update peer %s: %w", pi.Name, err))
|
||||||
|
Loading…
Reference in New Issue
Block a user