{"record":{"id":"fa11c34cf8089b03","repo":"kubernetes/kops","slug":"found-multiple-volumes-with-name-s-fa11c3","errorCode":null,"errorMessage":"found multiple Volumes with name: %s","messagePattern":"found multiple Volumes with name: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/volume.go","lineNumber":59,"sourceCode":"\nfunc (c *Volume) CompareWithID() *string {\n\treturn c.ID\n}\n\nfunc (c *Volume) Find(context *fi.CloudupContext) (*Volume, error) {\n\tcloud := context.T.Cloud.(openstack.OpenstackCloud)\n\topt := cinderv3.ListOpts{\n\t\tName: fi.ValueOf(c.Name),\n\t}\n\tvolumes, err := cloud.ListVolumes(opt)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tn := len(volumes)\n\tif n == 0 {\n\t\treturn nil, nil\n\t} else if n != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple Volumes with name: %s\", fi.ValueOf(c.Name))\n\t}\n\tv := volumes[0]\n\tactual := &Volume{\n\t\tID:               new(v.ID),\n\t\tName:             new(v.Name),\n\t\tAvailabilityZone: new(v.AvailabilityZone),\n\t\tVolumeType:       new(v.VolumeType),\n\t\tSizeGB:           new(int64(v.Size)),\n\t\tTags:             v.Metadata,\n\t\tLifecycle:        c.Lifecycle,\n\t}\n\t// remove tags \"readonly\" and \"attached_mode\", openstack are adding these and if not removed\n\t// kops will always try to update volumes\n\tdelete(actual.Tags, \"readonly\")\n\tdelete(actual.Tags, \"attached_mode\")\n\tc.ID = actual.ID\n\tc.AvailabilityZone = actual.AvailabilityZone\n\treturn actual, nil","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/volume.go#L41-L77","documentation":"Listing Cinder volumes by the task's name returned more than one volume. The name-to-volume mapping must be unique; duplicates make it ambiguous which volume the task manages, often from manual volume copies.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstacktasks/volume.go:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List volumes with the name and de-duplicate","Rename or delete the extra volumes","Re-run discovery once the name is unique"],"exampleFix":null,"handlingStrategy":"validation","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"}