{"record":{"id":"911faa450e4067c5","repo":"kubernetes/kops","slug":"error-listing-forwardingrules-v-911faa","errorCode":null,"errorMessage":"error listing forwardingRules: %v","messagePattern":"error listing forwardingRules: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":339,"sourceCode":"\t// TODO: Add context to GetApiIngressStatus\n\n\tvar ingresses []fi.ApiIngressStatus\n\n\tklog.V(2).Infof(\"Querying GCE to find forwardingRules for API\")\n\t// These are the ingress rules, so we search for them in the network project.\n\t_, project, err := ParseNameAndProjectFromNetworkID(cluster.Spec.Networking.NetworkID)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if project == \"\" {\n\t\tproject = c.Project()\n\t}\n\n\tforwardingRules, err := c.compute.ForwardingRules().List(context.Background(), project, c.region)\n\tif err != nil {\n\t\tif !IsNotFound(err) {\n\t\t\tforwardingRules = nil\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"error listing forwardingRules: %v\", err)\n\t\t}\n\t}\n\n\tclusterLabel := LabelForCluster(cluster.Name)\n\n\tfor _, forwardingRule := range forwardingRules {\n\t\tif !strings.HasPrefix(forwardingRule.Name, \"api-\") {\n\t\t\tcontinue\n\t\t}\n\n\t\tif clusterLabel.Value != forwardingRule.Labels[clusterLabel.Key] {\n\t\t\tcontinue\n\t\t}\n\n\t\tif forwardingRule.IPAddress == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"found forwardingRule %q, but it did not have an IPAddress\", forwardingRule.Name)\n\t\t}\n","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L321-L357","documentation":"Wraps the compute ForwardingRules().List failure while discovering the API load balancer's ingress IP. Not-found is tolerated (treated as no rules), so this fires only for genuine API errors: permissions on the (possibly shared) network project, quota, or connectivity.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Grant compute.forwardingRules.list on the network project for shared-VPC setups","Verify the NetworkID project reference","Inspect the wrapped API error and retry transient failures"],"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-12T07:17:12.445Z"}