From da97234f7cb9bed5f8046d835607c0a36049e0d4 Mon Sep 17 00:00:00 2001 From: Milan Lenco Date: Fri, 10 Nov 2023 11:55:08 +0100 Subject: [PATCH] Not having IP address with DT_NONE is expected EVE reports IPAddrNotAvail error even for app-shared ports with DT_NONE (aka DHCP-passthrough). But with such config it is actually expected that there is no IP address assigned and error should not be reported for the port. Signed-off-by: Milan Lenco (cherry picked from commit b4ca054d003a7aa6fc15d5bd2bef074821f15f44) --- pkg/pillar/zedcloud/send.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/pillar/zedcloud/send.go b/pkg/pillar/zedcloud/send.go index 02c1457f2e..4ee3954d55 100644 --- a/pkg/pillar/zedcloud/send.go +++ b/pkg/pillar/zedcloud/send.go @@ -329,6 +329,15 @@ func VerifyAllIntf(ctx *ZedCloudContext, remoteTemporaryFailure = true } if err != nil { + var noAddrErr *types.IPAddrNotAvail + if errors.As(err, &noAddrErr) { + // Interface link exists and is UP but does not have any IP address assigned. + // This is expected with app-shared interface and DhcpTypeNone. + if !portStatus.IsMgmt && portStatus.Dhcp == types.DT_NONE { + intfStatusMap.RecordSuccess(intf) + continue + } + } log.Errorf("Zedcloud un-reachable via interface %s: %s", intf, err) if sendErr, ok := err.(*SendError); ok && len(sendErr.Attempts) > 0 {