{"record":{"id":"03022f5a17d25987","repo":"kubernetes/kops","slug":"failed-to-list-dns-zones-s-03022f","errorCode":null,"errorMessage":"failed to list dns zones: %s","messagePattern":"failed to list dns zones: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/dns.go","lineNumber":40,"sourceCode":"\n\t\"github.com/gophercloud/gophercloud/v2/openstack/dns/v2/recordsets\"\n\t\"github.com/gophercloud/gophercloud/v2/openstack/dns/v2/zones\"\n\t\"k8s.io/apimachinery/pkg/util/wait\"\n\t\"k8s.io/kops/util/pkg/vfs\"\n)\n\n// ListDNSZones will list available DNS zones\nfunc (c *openstackCloud) ListDNSZones(opt zones.ListOptsBuilder) ([]zones.Zone, error) {\n\treturn listDNSZones(c, opt)\n}\n\nfunc listDNSZones(c OpenstackCloud, opt zones.ListOptsBuilder) ([]zones.Zone, error) {\n\tvar zs []zones.Zone\n\n\tdone, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n\t\tallPages, err := zones.List(c.DNSClient(), opt).AllPages(context.TODO())\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to list dns zones: %s\", err)\n\t\t}\n\t\tr, err := zones.ExtractZones(allPages)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to extract dns zone pages: %s\", err)\n\t\t}\n\t\tzs = r\n\t\treturn true, nil\n\t})\n\tif err != nil {\n\t\treturn zs, err\n\t} else if done {\n\t\treturn zs, nil\n\t} else {\n\t\treturn zs, wait.ErrWaitTimeout\n\t}\n}\n\nfunc deleteDNSRecordset(c OpenstackCloud, zoneID string, rrsetID string) error {","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/dns.go#L22-L58","documentation":"Error returned when listing Designate DNS zones fails inside listDNSZones, which is wrapped in vfs.RetryWithBackoff so only persistent failures surface. kOps needs the zone list for DNS-based cluster records.","triggerScenarios":"zones.List(c.DNSClient(), opt).AllPages(context.TODO()) errors persistently across retries: Designate API down, DNS client not initialized (no dns endpoint in catalog), auth failure, or invalid ListOpts filter.","commonSituations":"Designate not deployed while kops configured to use it; missing 'dns' service endpoint in Keystone catalog; wrong OS_DNS_ENDPOINT override; expired token; project lacking view permission on zones.","solutions":["Verify Designate works: `openstack zone list`","Ensure the Keystone catalog has a dns (designate) endpoint or set the DNS endpoint override in the cloud config","Check credentials/permission to list zones in the project","If Designate is absent, switch the cluster's DNS configuration to a supported provider"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight\npages, err := zones.List(dnsClient, zones.ListOpts{}).AllPages(ctx)\nif err != nil { return fmt.Errorf(\"designate unreachable: %v\", err) }","typeGuard":null,"tryCatchPattern":"done, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n    if _, err := zones.List(c.DNSClient(), opt).AllPages(context.TODO()); err != nil {\n        return false, fmt.Errorf(\"failed to list dns zones: %s\", err) // only surfaces after retries exhaust\n    }\n    return true, nil\n})","preventionTips":["Confirm Designate is deployed and the catalog has a dns endpoint","Validate zone list permissions for the kops project","If not using Designate, configure kops DNS to a supported provider instead"],"tags":["openstack","designate","dns","zones"],"backgroundTag":"openstack-api-list-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"}