cilium/cilium · error
unable to parse routing info: %w
Error message
unable to parse routing info: %w
What it means
linuxrouting.NewRoutingInfo failed while building the routing configuration from the IPAM response (gateway, CIDRs, master MAC, interface number). Parsing/validation of the routing inputs rejected them before any rules were installed.
Source
Thrown at plugins/cilium-cni/cmd/interface.go:70
} else {
for _, cidr := range ipv6CIDRs {
coalescedCIDRs = append(coalescedCIDRs, cidr.String())
}
masq = conf.MasqueradeProtocols.IPv6
}
routingInfo, err := linuxrouting.NewRoutingInfo(
logger,
ipam.Gateway.String(),
coalescedCIDRs,
ipam.MasterMac,
ipam.InterfaceNumber,
conf.IpamMode,
masq,
)
if err != nil {
return fmt.Errorf("unable to parse routing info: %w", err)
}
if err := routingInfo.Configure(
ip.AddrFromIP(ipConfig.Address.IP),
int(conf.DeviceMTU),
false,
); err != nil {
return fmt.Errorf("unable to install ip rules and routes: %w", err)
}
return nil
}
View on GitHub (pinned to ac7b90affa)
Solutions
- Log/inspect the full IPAM response (gateway, cidrs, master-mac, interface-number) and find the invalid field
- Verify the cloud integration (ENI/Azure) is healthy and returning complete interface metadata
- Check that ipam mode in the DaemonConfigurationStatus matches the IPAM plugin that produced the response
- Re-create the pod after fixing IPAM state on the agent
Example fix
// before (IPAM response)
{"gateway": "", "cidrs": ["10.0.0.0/24"], "masterMac": ""}
// after
{"gateway": "10.0.0.1", "cidrs": ["10.0.0.0/24"], "masterMac": "02:42:ac:11:00:02"} Defensive patterns
Strategy: validation
Validate before calling
// Pre-validate routing inputs before calling the CNI plugin
if ipam.Gateway.IsValid() {
if len(ipam.Cidrs) == 0 {
return fmt.Errorf("gateway present but no CIDRs; cloud IPAM metadata incomplete")
}
if ipam.MasterMac != "" && net.ParseMAC(ipam.MasterMac) != nil && len(ipam.InterfaceNumber) == 0 {
return fmt.Errorf("master-mac set but interface-number empty; check ENI/Azure metadata")
}
} Try / catch
if err := cniAdd(args); err != nil {
if strings.Contains(err.Error(), "unable to parse routing info") {
// log full IPAM response for the pod and alert on cloud-integration health
logIPAMResponse(args.ContainerID, ipamResp)
return err
}
return err
} Prevention
- Ensure cloud control-plane integrations (Cilium ENI/Azure operators) are healthy before scaling pods
- Check that ipam mode in the agent config matches the IPAM data source
- Alert on IPAM responses missing gateway/master-mac/interface-number fields
When it happens
Trigger: CNI ADD in ENI/Azure/AlibabaCloud (or delegated) IPAM modes where the gateway string is not a valid IP, CIDR list is empty/inconsistent, or the ipam-mode-specific combination of MasterMac/InterfaceNumber is invalid.
Common situations: Cloud IPAM metadata (ENI attachment info) missing or malformed; gateway field empty while still valid at the top-level check; mixed IPv4/IPv6 CIDR lists confusing the mode-specific parsing.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- failed to create router info: %w
- unable to install ip rule for ENI multi-node NodePort: %w
- unable to install ipv6 ip rule for ENI multi-node NodePort:
- unable to find ENI %s
- failed to add route '%s via %v dev %v': %w
AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31).
Data as JSON: /api/errors/7a76a8e4ba0ea60a.
Report an issue: GitHub.