{"record":{"id":"aa12e24b1a113f04","repo":"kubernetes/kops","slug":"failed-to-extract-recordsets-pages-for-zone-s-v","errorCode":null,"errorMessage":"failed to extract recordsets pages for zone %s: %v","messagePattern":"failed to extract recordsets pages for zone (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/openstack/dns.go","lineNumber":57,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list dns zones: %s\", err)\n\t}\n\n\tvar clusterZone zones.Zone\n\tfor _, zone := range zs {\n\t\tif strings.HasSuffix(os.clusterName, strings.TrimSuffix(zone.Name, \".\")) {\n\t\t\tclusterZone = zone\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif clusterZone.ID == \"\" {\n\t\treturn nil, fmt.Errorf(\"failed to find cluster dns zone\")\n\t}\n\n\trrs, err := os.osCloud.ListDNSRecordsets(clusterZone.ID, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to extract recordsets pages for zone %s: %v\", clusterZone.Name, err)\n\t}\n\n\tvar resourceTrackers []*resources.Resource\n\tfor _, rr := range rrs {\n\t\tif rr.Type != \"A\" || !strings.HasSuffix(strings.TrimSuffix(rr.Name, \".\"), os.clusterName) {\n\t\t\tcontinue\n\t\t}\n\n\t\tresourceTracker := &resources.Resource{\n\t\t\tName: rr.Name,\n\t\t\tID:   rr.ID,\n\t\t\tType: typeDNSRecord,\n\t\t\tDeleter: func(cloud fi.Cloud, r *resources.Resource) error {\n\t\t\t\treturn os.osCloud.DeleteDNSRecordset(clusterZone.ID, r.ID)\n\t\t\t},\n\t\t\tObj: rr,\n\t\t}\n","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/openstack/dns.go#L39-L75","documentation":"Once the cluster zone is identified, ListDNSRecordsets pages through the zone's recordsets via the Designate client. A failure is wrapped with this message including the zone name. It aborts cleanup because the A records belonging to the cluster (apiserver etc.) cannot be enumerated.","triggerScenarios":"os.osCloud.ListDNSRecordsets(clusterZone.ID, nil) errors: zone ID no longer valid (zone deleted concurrently), auth token expiry mid-operation, network error, pagination failure, or RBAC denying recordset reads.","commonSituations":"Zone deleted between the zone-list and recordset-list calls; expired Keystone token during a long-running delete; Designate API outage; insufficient role assignment on the zone.","solutions":["Re-run 'kops delete cluster' after transient errors","Verify the zone still exists with 'openstack zone show <zone>'","Refresh OpenStack credentials / re-source openrc","Check RBAC (reader/member role) on the DNS project","Check Designate service health and API endpoint"],"exampleFix":"// before\nrrs, err := os.osCloud.ListDNSRecordsets(clusterZone.ID, nil)\nif err != nil {\n\treturn nil, fmt.Errorf(\"failed to extract recordsets pages for zone %s: %v\", clusterZone.Name, err)\n}\n// after\nrrs, err := os.osCloud.ListDNSRecordsets(clusterZone.ID, nil)\nif err != nil {\n\treturn nil, fmt.Errorf(\"failed to extract recordsets pages for zone %s: %w\", clusterZone.Name, err)\n}","handlingStrategy":"retry","validationCode":"// Confirm zone still exists before listing recordsets\nzs, _ := os.osCloud.ListDNSZones(zones.ListOpts{})\n// ensure clusterZone.ID is among zs before calling ListDNSRecordsets","typeGuard":"func isZoneMissing(err error) bool { _, ok := err.(gophercloud.ErrDefault404); return ok }","tryCatchPattern":"rrs, err := os.osCloud.ListDNSRecordsets(clusterZone.ID, nil)\nif err != nil {\n\tif isZoneMissing(err) { /* zone gone: treat recordsets as cleaned */ }\n\treturn nil, fmt.Errorf(\"failed to extract recordsets pages for zone %s: %w\", clusterZone.Name, err)\n}","preventionTips":["Avoid deleting the DNS zone concurrently with cluster cleanup","Refresh credentials for long-running deletions","Check Designate service health before teardown","Retry transient pagination/network errors"],"tags":["openstack","designate","dns","recordsets","api-error"],"backgroundTag":"openstack-api-request-failed","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"}