{"record":{"id":"68864011a0ab019c","repo":"kubernetes/kops","slug":"multiple-servers-found-with-name-s","errorCode":null,"errorMessage":"Multiple servers found with name %s","messagePattern":"Multiple servers found with name (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/instance.go","lineNumber":190,"sourceCode":"\t\t\tcontinue\n\t\t}\n\t\tmetadataName := \"\"\n\t\tval, ok = server.Metadata[openstack.TagKopsName]\n\t\tif ok {\n\t\t\tmetadataName = val\n\t\t}\n\t\t// name or metadata tag should match to instance name\n\t\t// this is needed for backwards compatibility\n\t\tif server.Name == fi.ValueOf(e.Name) || metadataName == fi.ValueOf(e.Name) {\n\t\t\tfilteredList = append(filteredList, server)\n\t\t}\n\t}\n\n\tif filteredList == nil {\n\t\treturn nil, nil\n\t}\n\tif len(filteredList) > 1 {\n\t\treturn nil, fmt.Errorf(\"Multiple servers found with name %s\", fi.ValueOf(e.Name))\n\t}\n\n\tserver := filteredList[0]\n\tactual := &Instance{\n\t\tID:               new(server.ID),\n\t\tName:             e.Name,\n\t\tSSHKey:           new(server.KeyName),\n\t\tLifecycle:        e.Lifecycle,\n\t\tMetadata:         server.Metadata,\n\t\tRole:             new(server.Metadata[\"KopsRole\"]),\n\t\tAvailabilityZone: e.AvailabilityZone,\n\t\tGroupName:        e.GroupName,\n\t\tConfigDrive:      e.ConfigDrive,\n\t\tStatus:           new(server.Status),\n\t}\n\n\tports, err := cloud.ListPorts(ports.ListOpts{\n\t\tDeviceID: server.ID,","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/instance.go#L172-L208","documentation":"Instance discovery matched more than one server whose name or 'kops name' metadata equals the expected instance name. The name-to-server mapping must be unique; duplicates make it ambiguous which server represents the task, often caused by leftover servers from a previous cluster or manual copies.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstacktasks/instance.go:190 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List servers matching the name and inspect their k8s/kops metadata tags","Delete or rename stale duplicate servers","Re-run discovery once names are 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-12T07:17:12.445Z"}