mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 06:17:03 +02:00
Tolerate ErrDumpInterrupted when listing tun addresses (#1835)
smoke-extra / freebsd-amd64 (push) Failing after 37s
smoke-extra / linux-amd64-ipv6disable (push) Failing after 11s
smoke-extra / netbsd-amd64 (push) Failing after 12s
smoke-extra / openbsd-amd64 (push) Failing after 13s
smoke-extra / linux-386 (push) Failing after 14s
smoke / Run multi node smoke test (push) Failing after 1m41s
Build and test / Static checks (push) Successful in 2m10s
Build and test / Test linux (push) Failing after 1m32s
Build and test / Test linux-boringcrypto (push) Failing after 2m45s
Build and test / Test linux-pkcs11 (push) Failing after 1m57s
Build and test / Cross-build linux-arm (push) Successful in 3m8s
Build and test / Cross-build linux-mips (push) Successful in 3m49s
Build and test / Cross-build linux-other (push) Successful in 3m10s
Build and test / Cross-build windows (push) Successful in 1m3s
Build and test / Cross-build freebsd (push) Successful in 1m35s
Build and test / Cross-build netbsd (push) Successful in 1m33s
Build and test / Cross-build openbsd (push) Successful in 1m36s
Build and test / Cross-build mobile (push) Successful in 3m22s
smoke-extra / Run windows smoke test (push) Has been cancelled
Build and test / Test macos (push) Has been cancelled
Build and test / Test windows (push) Has been cancelled
Build and test / CI status (push) Has been cancelled
smoke-extra / freebsd-amd64 (push) Failing after 37s
smoke-extra / linux-amd64-ipv6disable (push) Failing after 11s
smoke-extra / netbsd-amd64 (push) Failing after 12s
smoke-extra / openbsd-amd64 (push) Failing after 13s
smoke-extra / linux-386 (push) Failing after 14s
smoke / Run multi node smoke test (push) Failing after 1m41s
Build and test / Static checks (push) Successful in 2m10s
Build and test / Test linux (push) Failing after 1m32s
Build and test / Test linux-boringcrypto (push) Failing after 2m45s
Build and test / Test linux-pkcs11 (push) Failing after 1m57s
Build and test / Cross-build linux-arm (push) Successful in 3m8s
Build and test / Cross-build linux-mips (push) Successful in 3m49s
Build and test / Cross-build linux-other (push) Successful in 3m10s
Build and test / Cross-build windows (push) Successful in 1m3s
Build and test / Cross-build freebsd (push) Successful in 1m35s
Build and test / Cross-build netbsd (push) Successful in 1m33s
Build and test / Cross-build openbsd (push) Successful in 1m36s
Build and test / Cross-build mobile (push) Successful in 3m22s
smoke-extra / Run windows smoke test (push) Has been cancelled
Build and test / Test macos (push) Has been cancelled
Build and test / Test windows (push) Has been cancelled
Build and test / CI status (push) Has been cancelled
This commit is contained in:
@@ -5,6 +5,7 @@ package overlay
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
@@ -483,8 +484,17 @@ func (t *tun) addIPs(link netlink.Link) error {
|
|||||||
//iterate over remainder, remove whoever shouldn't be there
|
//iterate over remainder, remove whoever shouldn't be there
|
||||||
al, err := netlink.AddrList(link, netlink.FAMILY_ALL)
|
al, err := netlink.AddrList(link, netlink.FAMILY_ALL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
//RTM_GETADDR dumps the whole system, so any concurrent address change
|
||||||
|
//interrupts it - including the kernel's async tentative->preferred
|
||||||
|
//flip of an IPv6 address the AddrReplace calls above just added,
|
||||||
|
//which makes this a race against our own setup. Partial results are
|
||||||
|
//still returned; the worst case is a stale address surviving until
|
||||||
|
//the next config reload, which beats failing startup over it.
|
||||||
|
if !errors.Is(err, netlink.ErrDumpInterrupted) {
|
||||||
return fmt.Errorf("failed to get tun address list: %s", err)
|
return fmt.Errorf("failed to get tun address list: %s", err)
|
||||||
}
|
}
|
||||||
|
t.l.Warn("tun address list dump was interrupted, stale addresses may remain")
|
||||||
|
}
|
||||||
|
|
||||||
for i := range al {
|
for i := range al {
|
||||||
if hasNetlinkAddr(newAddrs, al[i]) {
|
if hasNetlinkAddr(newAddrs, al[i]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user