{"record":{"id":"f8200010254a7589","repo":"kubernetes/kops","slug":"error-deleting-port-v","errorCode":null,"errorMessage":"error deleting port: %v","messagePattern":"error deleting port: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/port.go","lineNumber":137,"sourceCode":"\t})\n\tif err != nil {\n\t\treturn p, err\n\t} else if done {\n\t\treturn p, nil\n\t} else {\n\t\treturn p, wait.ErrWaitTimeout\n\t}\n}\n\nfunc (c *openstackCloud) DeletePort(portID string) error {\n\treturn deletePort(c, portID)\n}\n\nfunc deletePort(c OpenstackCloud, portID string) error {\n\tdone, err := vfs.RetryWithBackoff(deleteBackoff, func() (bool, error) {\n\t\terr := ports.Delete(context.TODO(), c.NetworkingClient(), portID).ExtractErr()\n\t\tif err != nil && !isNotFound(err) {\n\t\t\treturn false, fmt.Errorf(\"error deleting port: %v\", err)\n\t\t}\n\t\tif isNotFound(err) {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, nil\n\t})\n\tif err != nil {\n\t\treturn err\n\t} else if done {\n\t\treturn nil\n\t} else {\n\t\treturn wait.ErrWaitTimeout\n\t}\n}\n","sourceCodeStart":119,"sourceCodeEnd":152,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/port.go#L119-L152","documentation":"The Neutron port delete call failed with an error other than 404 (404 is treated as success). Deletion is retried with backoff; common blockers are the port still being attached to a device or in a non-deletable state.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstack/port.go:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check if the port is still attached and detach it first","Inspect the wrapped Neutron error for the blocker","Retry the deletion after the port is free"],"exampleFix":null,"handlingStrategy":"retry","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"}