{"record":{"id":"6c55c7e44f142aa7","repo":"kubernetes/kops","slug":"parsing-providerid-q-w","errorCode":null,"errorMessage":"parsing providerID %q: %w","messagePattern":"parsing providerID %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/controllers/gceipam.go","lineNumber":103,"sourceCode":"\t\t\t// we'll ignore not-found errors, since they can't be fixed by an immediate\n\t\t\t// requeue (we'll need to wait for a new notification), and we can get them\n\t\t\t// on deleted requests.\n\t\t\treturn ctrl.Result{}, nil\n\t\t}\n\t\treturn ctrl.Result{}, err\n\t}\n\n\tif len(node.Spec.PodCIDRs) == 0 {\n\t\t// CCM Node Controller has not done its thing yet\n\t\tif node.Spec.ProviderID == \"\" {\n\t\t\tklog.Infof(\"node %q has empty provider ID\", node.Name)\n\t\t\treturn ctrl.Result{}, nil\n\t\t}\n\n\t\t// e.g. providerID: gce://example-project-id/us-west2-a/instance-id\n\t\tproviderURL, err := url.Parse(node.Spec.ProviderID)\n\t\tif err != nil {\n\t\t\treturn ctrl.Result{}, fmt.Errorf(\"parsing providerID %q: %w\", node.Spec.ProviderID, err)\n\t\t}\n\t\ttokens := strings.Split(strings.Trim(providerURL.Path, \"/\"), \"/\")\n\t\tif len(tokens) != 2 {\n\t\t\treturn ctrl.Result{}, fmt.Errorf(\"unexpected format for providerID %q\", node.Spec.ProviderID)\n\t\t}\n\t\tproject := providerURL.Host\n\t\tzone := tokens[0]\n\t\tinstanceID := tokens[1]\n\t\tif project == \"\" || zone == \"\" || instanceID == \"\" {\n\t\t\treturn ctrl.Result{}, fmt.Errorf(\"unexpected format for providerID %q\", node.Spec.ProviderID)\n\t\t}\n\n\t\tinstance, err := r.gceClient.Instances.Get(project, zone, instanceID).Context(ctx).Do()\n\t\tif err != nil {\n\t\t\treturn ctrl.Result{}, fmt.Errorf(\"getting instance %s/%s/%s: %w\", project, zone, instanceID, err)\n\t\t}\n\n\t\tvar ipv6Addresses []string","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/controllers/gceipam.go#L85-L121","documentation":"In the GCE IPAM reconciler, the node's providerID (e.g. gce://project/zone/instance) failed to parse as a URL. The value present on the Node object is malformed, so its project/zone/instance components cannot be extracted for the GCE API call.","triggerScenarios":"Thrown at cmd/kops-controller/controllers/gceipam.go:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the node's spec.providerID value in the cluster","Correct or clear the malformed providerID so the CCM can repopulate it","Check whether an external actor wrote an invalid providerID"],"exampleFix":null,"handlingStrategy":"validation","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"}