|
|
@ -2,6 +2,7 @@ package zones |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"bytes" |
|
|
|
"bytes" |
|
|
|
|
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
|
|
|
|
|
|
|
@ -135,7 +136,11 @@ func (m *Machine) applyWireguardConfig(ring int, wg *wireguard.Config) error { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for _, peer := range wg.Peer { |
|
|
|
for _, peer := range wg.Peer { |
|
|
|
if err := m.applyWireguardPeerConfig(ring, peer); err != nil { |
|
|
|
err := m.applyWireguardPeerConfig(ring, peer) |
|
|
|
|
|
|
|
switch { |
|
|
|
|
|
|
|
case errors.Is(err, ErrUnknownNode): |
|
|
|
|
|
|
|
// ignore unknown peers
|
|
|
|
|
|
|
|
case err != nil: |
|
|
|
err = core.Wrapf(err, "%s: wg%v:%s", m.Name, ring, addr) |
|
|
|
err = core.Wrapf(err, "%s: wg%v:%s", m.Name, ring, addr) |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|