{"record":{"id":"7a76a8e4ba0ea60a","repo":"cilium/cilium","slug":"unable-to-parse-routing-info-w","errorCode":null,"errorMessage":"unable to parse routing info: %w","messagePattern":"unable to parse routing info: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/cilium-cni/cmd/interface.go","lineNumber":70,"sourceCode":"\t} else {\n\t\tfor _, cidr := range ipv6CIDRs {\n\t\t\tcoalescedCIDRs = append(coalescedCIDRs, cidr.String())\n\t\t}\n\n\t\tmasq = conf.MasqueradeProtocols.IPv6\n\t}\n\n\troutingInfo, err := linuxrouting.NewRoutingInfo(\n\t\tlogger,\n\t\tipam.Gateway.String(),\n\t\tcoalescedCIDRs,\n\t\tipam.MasterMac,\n\t\tipam.InterfaceNumber,\n\t\tconf.IpamMode,\n\t\tmasq,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to parse routing info: %w\", err)\n\t}\n\n\tif err := routingInfo.Configure(\n\t\tip.AddrFromIP(ipConfig.Address.IP),\n\t\tint(conf.DeviceMTU),\n\t\tfalse,\n\t); err != nil {\n\t\treturn fmt.Errorf(\"unable to install ip rules and routes: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":52,"sourceCodeEnd":83,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/plugins/cilium-cni/cmd/interface.go#L52-L83","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (IPAM response)\n{\"gateway\": \"\", \"cidrs\": [\"10.0.0.0/24\"], \"masterMac\": \"\"}\n// after\n{\"gateway\": \"10.0.0.1\", \"cidrs\": [\"10.0.0.0/24\"], \"masterMac\": \"02:42:ac:11:00:02\"}","handlingStrategy":"validation","validationCode":"// Pre-validate routing inputs before calling the CNI plugin\nif ipam.Gateway.IsValid() {\n    if len(ipam.Cidrs) == 0 {\n        return fmt.Errorf(\"gateway present but no CIDRs; cloud IPAM metadata incomplete\")\n    }\n    if ipam.MasterMac != \"\" && net.ParseMAC(ipam.MasterMac) != nil && len(ipam.InterfaceNumber) == 0 {\n        return fmt.Errorf(\"master-mac set but interface-number empty; check ENI/Azure metadata\")\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := cniAdd(args); err != nil {\n    if strings.Contains(err.Error(), \"unable to parse routing info\") {\n        // log full IPAM response for the pod and alert on cloud-integration health\n        logIPAMResponse(args.ContainerID, ipamResp)\n        return err\n    }\n    return err\n}","preventionTips":["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"],"tags":["cni","routing","ipam","cilium","eni"],"backgroundTag":"invalid-routing-info","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}