{"record":{"id":"1d960b3e1e39a046","repo":"kubernetes/kops","slug":"found-multiple-subnets-with-name-s","errorCode":null,"errorMessage":"found multiple subnets with name: %s","messagePattern":"found multiple subnets with name: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/subnet.go","lineNumber":110,"sourceCode":"\nfunc (s *Subnet) Find(context *fi.CloudupContext) (*Subnet, error) {\n\tcloud := context.T.Cloud.(openstack.OpenstackCloud)\n\topt := subnets.ListOpts{\n\t\tID:         fi.ValueOf(s.ID),\n\t\tName:       fi.ValueOf(s.Name),\n\t\tNetworkID:  fi.ValueOf(s.Network.ID),\n\t\tCIDR:       fi.ValueOf(s.CIDR),\n\t\tEnableDHCP: new(true),\n\t\tIPVersion:  4,\n\t}\n\trs, err := cloud.ListSubnets(opt)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rs == nil {\n\t\treturn nil, nil\n\t} else if len(rs) != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple subnets with name: %s\", fi.ValueOf(s.Name))\n\t}\n\treturn NewSubnetTaskFromCloud(cloud, s.Lifecycle, &rs[0], s)\n}\n\nfunc (s *Subnet) Run(context *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(s, context)\n}\n\nfunc (*Subnet) CheckChanges(a, e, changes *Subnet) error {\n\tif a == nil {\n\t\tif e.Name == nil {\n\t\t\treturn fi.RequiredField(\"Name\")\n\t\t}\n\t\tif e.Network == nil {\n\t\t\treturn fi.RequiredField(\"Network\")\n\t\t}\n\t\tif e.CIDR == nil {\n\t\t\treturn fi.RequiredField(\"CIDR\")","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/subnet.go#L92-L128","documentation":"Listing subnets with the task's filter tuple (ID/name/network/CIDR, DHCP-enabled, IPv4) returned more than one subnet. The filter is expected to be unique; duplicates make it ambiguous which subnet the task models.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstacktasks/subnet.go:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List subnets with the same filters and de-duplicate","Rename or delete the colliding subnet","Re-run discovery once the match 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-12T07:17:12.445Z"}