{"record":{"id":"f8f808eef8162310","repo":"kubernetes/kops","slug":"error-creating-port-v-f8f808","errorCode":null,"errorMessage":"Error creating port: %v","messagePattern":"Error creating port: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/port.go","lineNumber":261,"sourceCode":"\t\tif changes.Network != nil {\n\t\t\treturn fi.CannotChangeField(\"Network\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (*Port) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, changes *Port) error {\n\tif a == nil {\n\t\tklog.V(2).Infof(\"Creating Port with name: %q\", fi.ValueOf(e.Name))\n\n\t\topt, err := portCreateOptsFromPortTask(t, a, e, changes)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error creating port cloud opts: %v\", err)\n\t\t}\n\n\t\tv, err := t.Cloud.CreatePort(opt)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error creating port: %v\", err)\n\t\t}\n\n\t\tif e.Tags != nil {\n\t\t\tfor _, tag := range e.Tags {\n\t\t\t\terr = t.Cloud.AppendTag(openstack.ResourceTypePort, v.ID, tag)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"Error appending tag to port: %v\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\te.ID = new(v.ID)\n\t\tklog.V(2).Infof(\"Creating a new Openstack port, id=%s\", v.ID)\n\t\treturn nil\n\t}\n\tif changes != nil {\n\t\tif changes.Tags != nil {\n\t\t\tklog.V(2).Infof(\"Updating tags for Port with name: %q\", fi.ValueOf(e.Name))\n\t\t\tfor _, tag := range e.Tags {","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/port.go#L243-L279","documentation":"Port.RenderOpenstack wraps a failure from t.Cloud.CreatePort (the Neutron port-create API) with this message. The port creation options were built successfully, but Neutron rejected or failed the create call.","triggerScenarios":"After building ports.CreateOpts, the CreatePort API call returns an error: invalid subnet/network ID, fixed-IP conflict, quota exceeded (ports per project), MTU mismatch, or API/auth failure.","commonSituations":"IP address exhaustion in the subnet; port quota reached; network or subnet deleted externally while kops was running; Neutron policy forbids the user binding fixed IPs; invalid allowed address pairs.","solutions":["Read the wrapped Neutron error for the exact API cause","Check subnet IP availability and project port quotas","Verify the network/subnet IDs referenced by the cluster spec still exist","Re-run kops to retry transient Neutron failures"],"exampleFix":"null","handlingStrategy":"retry","validationCode":"// pre-check subnet capacity and quotas before creating ports\nsubnets, err := cloud.ListSubnets(subnets.ListOpts{NetworkID: networkID})\nif err != nil || len(subnets) == 0 {\n    return fmt.Errorf(\"network %s has no usable subnets\", networkID)\n}","typeGuard":null,"tryCatchPattern":"v, err := t.Cloud.CreatePort(opt)\nif err != nil {\n    // retry on 409/5xx transient errors; abort on quota/IP-exhaustion errors\n    return fmt.Errorf(\"Error creating port: %v\", err)\n}","preventionTips":["Monitor subnet IP utilization and port quotas","Don't delete networks/subnets mid-apply","Ensure allowed address pairs comply with cloud policy"],"tags":["openstack","neutron","port"],"backgroundTag":"openstack-api-create-failed","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"}