We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 898526c + 923ead2 commit 15dd0aeCopy full SHA for 15dd0ae
lxd/network/driver_common.go
@@ -2,6 +2,7 @@ package network
2
3
import (
4
"context"
5
+ "errors"
6
"fmt"
7
"net"
8
"os"
@@ -10,6 +11,7 @@ import (
10
11
"unicode"
12
13
"github.com/canonical/lxd/client"
14
+ "github.com/canonical/lxd/lxd/bgp"
15
"github.com/canonical/lxd/lxd/cluster"
16
"github.com/canonical/lxd/lxd/cluster/request"
17
"github.com/canonical/lxd/lxd/db"
@@ -671,7 +673,7 @@ func (n *common) bgpClearPeers(config map[string]string) error {
671
673
// Remove the peer.
672
674
fields := strings.Split(peer, ",")
675
err := n.state.BGP.RemovePeer(net.ParseIP(fields[0]))
- if err != nil {
676
+ if err != nil && !errors.Is(err, bgp.ErrPeerNotFound) {
677
return err
678
}
679
0 commit comments