{"record":{"id":"279862e6e8a66956","repo":"kubernetes/kops","slug":"unable-to-determine-zones-in-region-q-279862","errorCode":null,"errorMessage":"unable to determine zones in region %q","messagePattern":"unable to determine zones in region %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":301,"sourceCode":"func GetZones(c GCECloud) ([]string, error) {\n\tvar zones []string\n\t// TODO: Only zones in api.Cluster object, if we have one?\n\tgceZones, err := c.Compute().Zones().List(context.Background(), c.Project())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing zones: %v\", err)\n\t}\n\tfor _, gceZone := range gceZones {\n\t\tu, err := ParseGoogleCloudURL(gceZone.Region)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif u.Name != c.Region() {\n\t\t\tcontinue\n\t\t}\n\t\tzones = append(zones, gceZone.Name)\n\t}\n\tif len(zones) == 0 {\n\t\treturn nil, fmt.Errorf(\"unable to determine zones in region %q\", c.Region())\n\t}\n\n\tklog.Infof(\"Scanning zones: %v\", zones)\n\treturn zones, nil\n}\n\n// TODO refactor this out of resources\n// this is needed for delete groups and other new methods\n\n// Zones returns the zones in a region\nfunc (c *gceCloudImplementation) Zones() ([]string, error) {\n\treturn GetZones(c)\n}\n\nfunc (c *gceCloudImplementation) WaitForOp(op *compute.Operation) error {\n\treturn WaitForOp(c.compute.srv, op)\n}\n","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L283-L319","documentation":"Post-filter guard in GetZones: zones were listed successfully, but none matched the configured region after filtering by parsed region URL. Indicates the cluster's configured region is wrong or has no zones visible to this project.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the region in the cluster spec","Verify the project has access to zones in that region","Check the parsed region matches GCE region naming (e.g. us-central1)"],"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-12T12:17:11.808Z"}