{"record":{"id":"9a837d493388b407","repo":"kubernetes/kops","slug":"getting-addresses-for-network-interface-q-w","errorCode":null,"errorMessage":"getting addresses for network interface %q: %w","messagePattern":"getting addresses for network interface %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/model/kube_apiserver.go","lineNumber":93,"sourceCode":"\t\t\treturn err\n\t\t}\n\t\tif localIP != \"\" {\n\t\t\tkubeAPIServer.AdvertiseAddress = localIP\n\t\t}\n\t}\n\n\tif b.CloudProvider() == kops.CloudProviderMetal {\n\t\t// Workaround for https://github.com/kubernetes/kubernetes/issues/111671\n\t\tif b.IsIPv6Only() {\n\t\t\tinterfaces, err := net.Interfaces()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"getting local network interfaces: %w\", err)\n\t\t\t}\n\t\t\tvar ipv6s []net.IP\n\t\t\tfor _, intf := range interfaces {\n\t\t\t\taddresses, err := intf.Addrs()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"getting addresses for network interface %q: %w\", intf.Name, err)\n\t\t\t\t}\n\t\t\t\tfor _, addr := range addresses {\n\t\t\t\t\tip, _, err := net.ParseCIDR(addr.String())\n\t\t\t\t\tif ip == nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"parsing ip address %q (bound to network %q): %w\", addr.String(), intf.Name, err)\n\t\t\t\t\t}\n\t\t\t\t\tif ip.To4() != nil {\n\t\t\t\t\t\t// We're only looking for ipv6\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif ip.IsLinkLocalUnicast() {\n\t\t\t\t\t\tklog.V(4).Infof(\"ignoring link-local unicast addr %v\", addr)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif ip.IsLinkLocalMulticast() {\n\t\t\t\t\t\tklog.V(4).Infof(\"ignoring link-local multicast addr %v\", addr)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/model/kube_apiserver.go#L75-L111","documentation":"In the kube-apiserver builder's IPv6-only workaround for bare-metal (kubernetes#111671), intf.Addrs() failure is wrapped here. It fires when the OS refuses to enumerate addresses on one of the machine's network interfaces (interface went down mid-iteration, permissions), aborting the builder's search for a local IPv6 address to use as AdvertiseAddress.","triggerScenarios":"Thrown at nodeup/pkg/model/kube_apiserver.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check interface health with ip addr","Ignore the broken interface if not needed","Re-run nodeup"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}