{"record":{"id":"83e98d3c3c4d8ad9","repo":"kubernetes/kops","slug":"failed-to-list-volumes-s","errorCode":null,"errorMessage":"failed to list volumes: %s","messagePattern":"failed to list volumes: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/digitalocean/resources.go","lineNumber":115,"sourceCode":"\t\t\tDumper:  dumpDroplet,\n\t\t\tObj:     droplet,\n\t\t}\n\n\t\tresourceTrackers = append(resourceTrackers, resourceTracker)\n\t}\n\n\treturn resourceTrackers, nil\n}\n\nfunc listVolumes(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) {\n\tc := cloud.(do.DOCloud)\n\tvar resourceTrackers []*resources.Resource\n\n\tvolumeMatch := strings.ReplaceAll(clusterName, \".\", \"-\")\n\n\tvolumes, err := c.GetAllVolumesByRegion()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list volumes: %s\", err)\n\t}\n\n\tfor _, volume := range volumes {\n\t\tif strings.Contains(volume.Name, volumeMatch) {\n\t\t\tresourceTracker := &resources.Resource{\n\t\t\t\tName:    volume.Name,\n\t\t\t\tID:      volume.ID,\n\t\t\t\tType:    resourceTypeVolume,\n\t\t\t\tDeleter: deleteVolume,\n\t\t\t\tObj:     volume,\n\t\t\t}\n\n\t\t\tvar blocks []string\n\t\t\tfor _, dropletID := range volume.DropletIDs {\n\t\t\t\tblocks = append(blocks, \"droplet:\"+strconv.Itoa(dropletID))\n\t\t\t}\n\n\t\t\tresourceTracker.Blocks = blocks","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/digitalocean/resources.go#L97-L133","documentation":"listVolumes in the DigitalOcean resource tracker wraps GetAllVolumesByRegion failure during `kops delete cluster` discovery. It fires when the DO API errors while enumerating volumes in the region, aborting discovery of cluster-matched volumes (name contains the cluster name with dots replaced by dashes).","triggerScenarios":"Thrown at pkg/resources/digitalocean/resources.go:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the DigitalOcean API token and region configuration","Retry after transient API errors or rate limits","Confirm volumes exist in the expected region"],"exampleFix":null,"handlingStrategy":"retry","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"}