{"record":{"id":"40a1690a5e26b8f7","repo":"kubernetes/kops","slug":"unexpected-format-for-providerid-q","errorCode":null,"errorMessage":"unexpected format for providerID %q","messagePattern":"unexpected format for providerID %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/controllers/gceipam.go","lineNumber":107,"sourceCode":"\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\n\t\tfor _, nic := range instance.NetworkInterfaces {\n\t\t\tfor _, ipv6AccessConfig := range nic.Ipv6AccessConfigs {\n\t\t\t\tif ipv6AccessConfig.ExternalIpv6 != \"\" {\n\t\t\t\t\tipv6Address := fmt.Sprintf(\"%s/%d\", ipv6AccessConfig.ExternalIpv6, ipv6AccessConfig.ExternalIpv6PrefixLength)","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/controllers/gceipam.go#L89-L125","documentation":"The GCE IPAM reconciler parsed the node's providerID but its path did not contain exactly two segments (<zone>/<instance>). The providerID parsed as a URL yet does not match the expected gce://project/zone/instance shape, so the components cannot be used.","triggerScenarios":"Thrown at cmd/kops-controller/controllers/gceipam.go:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the node's spec.providerID matches gce://PROJECT/ZONE/INSTANCE","Regenerate the providerID by restarting the GCE cloud-controller-manager on that node","Investigate what wrote the non-conforming 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"}