{"record":{"id":"973d8ff4effedc22","repo":"kubernetes/kops","slug":"error-listing-targetpools-v","errorCode":null,"errorMessage":"error listing TargetPools: %v","messagePattern":"error listing TargetPools: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/gce/gce.go","lineNumber":386,"sourceCode":"\t\t\tklog.Infof(\"Disk not found, assuming deleted: %q\", t.SelfLink)\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"error deleting Disk %s: %v\", t.SelfLink, err)\n\t}\n\n\treturn c.WaitForOp(op)\n}\n\nfunc (d *clusterDiscoveryGCE) listTargetPools() ([]*resources.Resource, error) {\n\tc := d.gceCloud\n\n\tvar resourceTrackers []*resources.Resource\n\n\tctx := context.Background()\n\n\ttps, err := c.Compute().TargetPools().List(ctx, c.Project(), c.Region())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing TargetPools: %v\", err)\n\t}\n\n\tfor _, tp := range tps {\n\t\tif !d.matchesClusterName(tp.Name) {\n\t\t\tcontinue\n\t\t}\n\n\t\tresourceTracker := &resources.Resource{\n\t\t\tName:    tp.Name,\n\t\t\tID:      tp.Name,\n\t\t\tType:    typeTargetPool,\n\t\t\tDeleter: deleteTargetPool,\n\t\t\tObj:     tp,\n\t\t}\n\n\t\tklog.V(4).Infof(\"Found resource: %s\", tp.SelfLink)\n\t\tresourceTrackers = append(resourceTrackers, resourceTracker)\n","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/gce/gce.go#L368-L404","documentation":"listTargetPools wraps the Compute TargetPools.List failure (project+region scoped) during GCE cluster resource discovery. It fires on API errors — credentials, disabled Compute API, region mismatch — and aborts enumeration of the cluster's load-balancer target pools.","triggerScenarios":"Thrown at pkg/resources/gce/gce.go:386 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check GCP credentials and compute.targetPools.list permission","Retry after transient API errors","Verify the region in the cluster spec is correct"],"exampleFix":null,"handlingStrategy":"retry","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"}