{"record":{"id":"d0ac332d6fcdf197","repo":"kubernetes/kops","slug":"error-fetching-instance-list-v","errorCode":null,"errorMessage":"error fetching instance list: %v","messagePattern":"error fetching instance list: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/servergroup.go","lineNumber":172,"sourceCode":"\t\t\treturn fmt.Errorf(\"error creating ServerGroup: %v\", err)\n\t\t}\n\t\te.ID = new(g.ID)\n\t\treturn nil\n\t} else if changes.IGMap != nil {\n\t\tfor igName, maxSize := range changes.IGMap {\n\t\t\tactualIG := a.IGMap[igName]\n\t\t\tif fi.ValueOf(actualIG) > fi.ValueOf(maxSize) {\n\t\t\t\tcurrentLastIndex := fi.ValueOf(actualIG)\n\n\t\t\t\tfor currentLastIndex > fi.ValueOf(maxSize) {\n\t\t\t\t\tiName := strings.ToLower(fmt.Sprintf(\"%s-%d.%s\", igName, currentLastIndex, fi.ValueOf(a.ClusterName)))\n\t\t\t\t\tinstanceName := strings.ReplaceAll(iName, \".\", \"-\")\n\t\t\t\t\topts := servers.ListOpts{\n\t\t\t\t\t\tName: fmt.Sprintf(\"^%s\", igName),\n\t\t\t\t\t}\n\t\t\t\t\tallInstances, err := t.Cloud.ListInstances(opts)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"error fetching instance list: %v\", err)\n\t\t\t\t\t}\n\n\t\t\t\t\tinstances := []servers.Server{}\n\t\t\t\t\tfor _, server := range allInstances {\n\t\t\t\t\t\tval, ok := server.Metadata[\"k8s\"]\n\t\t\t\t\t\tif !ok || val != fi.ValueOf(a.ClusterName) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmetadataName := \"\"\n\t\t\t\t\t\tval, ok = server.Metadata[openstack.TagKopsName]\n\t\t\t\t\t\tif ok {\n\t\t\t\t\t\t\tmetadataName = val\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// name or metadata tag should match to instance name\n\t\t\t\t\t\t// this is needed for backwards compatibility\n\t\t\t\t\t\tif server.Name == instanceName || metadataName == instanceName {\n\t\t\t\t\t\t\tinstances = append(instances, server)\n\t\t\t\t\t\t}","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/servergroup.go#L154-L190","documentation":"RenderOpenstack returns this during ServerGroup scale-down when listing instances via t.Cloud.ListInstances(servers.ListOpts{Name: \"^<igName>\"}) fails. The task needs the current member instances of the group to decide which to delete; without the list the scale-down cannot proceed. The wrapped error is the underlying OpenStack compute API failure.","triggerScenarios":"During the scale-down path (changes.IGMap with a decreased maxSize), ListInstances with a regex Name filter returns an error: Nova API unreachable, authentication/authorization failure, or a malformed/unsupported regex name filter rejected by the compute API.","commonSituations":"Credentials lost/expired mid-cluster-operation; the Nova endpoint is behind a proxy that blocks the servers list; compute API throttling; cloud rejecting the '^name' regex (older Nova versions or non-default filtering backends).","solutions":["Verify list works out-of-band: 'openstack server list --name ^<igName>' with the same credentials.","Re-check OpenStack auth environment/credentials for the kOps cloud client.","Retry the kops apply/upgrade — transient Nova 5xx or throttling is a frequent cause.","If the regex filter is rejected by your cloud, confirm Nova microversion supports regex name filters or list by prefix manually."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm the API is listable with the same credentials before scaling\ncurl -sf -H \"X-Auth-Token: $OS_TOKEN\" \"$OS_COMPUTE_ENDPOINT/servers/detail\" >/dev/null || echo \"compute list API unavailable\"","typeGuard":null,"tryCatchPattern":"// Wrap scale-down operations with bounded retry for transient Nova 5xx\nif err := scaleDownServerGroup(...); err != nil {\n    if isTransient(err) { backoffRetry(3) } else { return err }\n}","preventionTips":["Re-authenticate before long kops operations (tokens/app credentials can expire mid-run).","Prefer application credentials over short-lived tokens for automation.","Verify Nova filtering (regex name) works on your cloud with a manual 'openstack server list --name ^prefix'.","Retry kops apply on transient errors; avoid running concurrent applies/autoscalers."],"tags":["openstack","nova","instance-list","cloud-api"],"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"}