{"record":{"id":"07695cb7cb5e9a60","repo":"kubernetes/kops","slug":"error-listing-servers-v-07695c","errorCode":null,"errorMessage":"error listing servers: %v","messagePattern":"error listing servers: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/poolassociation.go","lineNumber":164,"sourceCode":"\t\tif err != nil {\n\t\t\t// sometimes provisioning interfaces is slow, that is why we need retry the interface from the server\n\t\t\treturn false, fmt.Errorf(\"Failed to get fixed ip for associated pool: %v\", err)\n\t\t}\n\t\treturn true, nil\n\t})\n\tif done {\n\t\treturn memberAddress, nil\n\t}\n\treturn memberAddress, err\n}\n\nfunc (_ *PoolAssociation) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, changes *PoolAssociation) error {\n\tif a == nil {\n\t\tserverList, err := t.Cloud.ListInstances(servers.ListOpts{\n\t\t\tName: fmt.Sprintf(\"^%s\", fi.ValueOf(e.ServerPrefix)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error listing servers: %v\", err)\n\t\t}\n\n\t\tfor _, server := range serverList {\n\t\t\tval, ok := server.Metadata[\"k8s\"]\n\t\t\tif !ok || val != fi.ValueOf(e.ClusterName) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmemberAddress, err := GetServerFixedIP(t.Cloud.ComputeClient(), &server, fi.ValueOf(e.InterfaceName))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tmember, err := t.Cloud.AssociateToPool(&server, fi.ValueOf(e.Pool.ID), v2pools.CreateMemberOpts{\n\t\t\t\tName:         fi.ValueOf(e.Name),\n\t\t\t\tProtocolPort: fi.ValueOf(e.ProtocolPort),\n\t\t\t\tSubnetID:     fi.ValueOf(e.Pool.Loadbalancer.VipSubnet),\n\t\t\t\tAddress:      memberAddress,","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go#L146-L182","documentation":"When rendering a new PoolAssociation (a == nil), RenderOpenstack lists Nova servers by a regex built from ServerPrefix to find the members to associate with the Octavia pool. If the Nova list-instances call fails, kOps wraps the gophercloud error with this message and aborts the render.","triggerScenarios":"t.Cloud.ListInstances(servers.ListOpts{Name: \"^<prefix>\"}) returns an error: Nova API 401 (expired token), 403 (policy denial), 5xx/timeout on the compute endpoint, or an invalid regex in the name filter rejected by the compute API.","commonSituations":"Keystone token expiring during long cluster updates; Nova control plane degraded/throttled while many instances are being created; ServerPrefix containing regex metacharacters producing an unsupported filter.","solutions":["Check the wrapped gophercloud error for the Nova HTTP status code","Re-authenticate if 401; confirm credentials still valid for the project","Ensure ServerPrefix forms a valid regex (escape special characters) when editing the cluster spec","Retry `kops update cluster` if Nova returned 5xx/timeout; check Nova service health"],"exampleFix":"// before\nserverPrefix: \"cluster.name(k8s)\" // regex metachars\n// after\nserverPrefix: \"cluster-name-k8s\" // regex-safe prefix","handlingStrategy":"retry","validationCode":"// pre-flight: credentials + compute reachability\nif err := exec.Command(\"openstack\", \"token\", \"issue\").Run(); err != nil {\n\treturn fmt.Errorf(\"re-authenticate before updating cluster\")\n}","typeGuard":"func isRetryableNovaError(err error) bool {\n\tvar gerr gophercloud.ErrUnexpectedResponseCode\n\tif errors.As(err, &gerr) {\n\t\treturn gerr.Actual >= 500 || gerr.Actual == 401 || gerr.Actual == 429\n\t}\n\treturn false\n}","tryCatchPattern":"serverList, err := t.Cloud.ListInstances(servers.ListOpts{Name: prefixRegex})\nif err != nil {\n\tif isRetryableNovaError(err) {\n\t\treturn retryWithBackoff(backoff)\n\t}\n\treturn fmt.Errorf(\"error listing servers: %v\", err)\n}","preventionTips":["Refresh Keystone tokens before long-running cluster updates","Keep ServerPrefix free of regex metacharacters","Monitor Nova API health/throttling during cluster scale-up"],"tags":["openstack","nova","compute","loadbalancer"],"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-12T12:17:11.808Z"}