Skip to content

Commit

Permalink
Not having IP address with DhcpTypeNone is expected
Browse files Browse the repository at this point in the history
EVE reports IPAddrNotAvailError even for app-shared ports
with DhcpTypeNone (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 <milan@zededa.com>
(cherry picked from commit b4ca054)
  • Loading branch information
milan-zededa committed Nov 20, 2023
1 parent d1bde18 commit e2efdc8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/pillar/zedcloud/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,15 @@ func VerifyAllIntf(ctx *ZedCloudContext, url string, requiredSuccessCount uint,
verifyRV.RemoteTempFailure = 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 DT_NONE.
if !portStatus.IsMgmt && portStatus.Dhcp == types.DT_NONE {
verifyRV.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 {
Expand Down

0 comments on commit e2efdc8

Please sign in to comment.