{"record":{"id":"60d7588e646531d4","repo":"kubernetes/kops","slug":"error-appending-tag-to-port-v","errorCode":null,"errorMessage":"Error appending tag to port: %v","messagePattern":"Error appending tag to port: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/port.go","lineNumber":268,"sourceCode":"func (*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 {\n\t\t\t\terr := t.Cloud.AppendTag(openstack.ResourceTypePort, fi.ValueOf(a.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\tif changes.AllowedAddressPairs != nil {","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/port.go#L250-L286","documentation":"Immediately after creating a port, RenderOpenstack applies each tag from the Port task via t.Cloud.AppendTag(ResourceTypePort, v.ID, tag). Any failure appending a tag to the freshly created port is wrapped with this message.","triggerScenarios":"e.Tags is non-nil and one of the AppendTag calls to the Neutron tagging API fails for the new port ID (auth/token issue, API outage, tag policy restriction).","commonSituations":"Neutron tagging extension (tag: resource) not enabled in the deployment; token expired mid-render; characters in tag unsupported by the deployment; transient 5xx from Neutron.","solutions":["Read the inner error; check whether the neutron tagging extension is enabled (`openstack extension list | grep tag`)","Re-run kops — the port already exists and reconciliation will reuse it and retry tag application","Verify credentials/permissions for the tagging API","Remove or adjust unsupported tag values in the cluster spec"],"exampleFix":"null","handlingStrategy":"retry","validationCode":"// check tagging extension support\nexts, err := cloud.ListExtensions()\nif !supportsTagging(exts) {\n    return fmt.Errorf(\"neutron tagging extension unavailable; remove port tags from spec\")\n}","typeGuard":null,"tryCatchPattern":"err = t.Cloud.AppendTag(openstack.ResourceTypePort, v.ID, tag)\nif err != nil {\n    return fmt.Errorf(\"Error appending tag to port: %v\", err) // re-run kops; port exists, tags will be retried\n}","preventionTips":["Confirm the Neutron tagging extension is enabled in your cloud","Refresh tokens for long-running applies","Avoid unsupported characters in tag values"],"tags":["openstack","neutron","tags"],"backgroundTag":"openstack-tag-update-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"}