{"record":{"id":"a534e5adf01acda8","repo":"kubernetes/kops","slug":"failed-to-list-layer-3-floating-ips-for-port-id-s","errorCode":null,"errorMessage":"failed to list layer 3 floating ips for port ID %s: %v","messagePattern":"failed to list layer 3 floating ips for port ID (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/floatingip.go","lineNumber":187,"sourceCode":"\t\t\t\tName:      e.Name,\n\t\t\t\tIP:        new(fip.FloatingIP),\n\t\t\t\tLifecycle: e.Lifecycle,\n\t\t\t}\n\t\t\te.ID = actual.ID\n\t\t\te.IP = actual.IP\n\t\t\treturn actual, nil\n\t\t}\n\t}\n\n\treturn nil, nil\n}\n\nfunc findFipByPortID(cloud openstack.OpenstackCloud, id string) (fip *l3floatingip.FloatingIP, err error) {\n\tfips, err := cloud.ListL3FloatingIPs(l3floatingip.ListOpts{\n\t\tPortID: id,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list layer 3 floating ips for port ID %s: %v\", id, err)\n\t}\n\tif len(fips) == 0 {\n\t\treturn nil, nil\n\t}\n\tif len(fips) > 1 {\n\t\treturn nil, fmt.Errorf(\"multiple floating ips associated to port: %s\", id)\n\t}\n\treturn &fips[0], nil\n}\n\nfunc (e *FloatingIP) Run(c *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(e, c)\n}\n\nfunc (_ *FloatingIP) CheckChanges(a, e, changes *FloatingIP) error {\n\tif a == nil {\n\t\tif e.Name == nil {\n\t\t\treturn fi.RequiredField(\"Name\")","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/floatingip.go#L169-L205","documentation":"findFipByPortID in floatingip.go:187 wraps an error from cloud.ListL3FloatingIPs(PortID: id) while resolving the floating IP bound to a given Neutron port. Called from FloatingIP.Find, it means the API-level list by port ID failed — not that the port has zero FIPs (that returns nil,nil).","triggerScenarios":"Neutron returns 401/403/404/5xx for the floatingips list filtered by port_id, or a network connectivity failure to the Neutron endpoint.","commonSituations":"Expired credentials mid-run; Neutron endpoint unreachable from the machine running kops (VPN/proxy/DNS issues); OpenStack cloud with restricted list policies.","solutions":["Inspect the wrapped error's HTTP code and fix accordingly (re-auth for 401, permissions for 403).","Confirm connectivity to the Neutron public endpoint (`openstack floating ip list`).","Retry the kops command if the failure was a transient 5xx.","Ensure the port ID exists: `openstack port show <id>`; a deleted port can surface as odd API behavior."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight: ensure the port exists and Neutron list API is healthy\nif _, err := cloud.ListL3FloatingIPs(l3floatingip.ListOpts{PortID: portID, Limit: 1}); err != nil {\n    return fmt.Errorf(\"preflight FIP list failed: %w\", err)\n}","typeGuard":"func isRetryableNeutronError(err error) bool {\n    var gerr gophercloud.ErrUnexpectedResponseCode\n    return errors.As(err, &gerr) && gerr.Actual >= 500\n}","tryCatchPattern":"fip, err := findFipByPortID(cloud, portID)\nif err != nil {\n    if isRetryableNeutronError(err) {\n        // back off and retry the whole kops step\n    }\n    return nil, err\n}","preventionTips":["Verify VPN/proxy/DNS reachability to the Neutron endpoint","Run `openstack port show <port-id>` to confirm the port exists","Retry transient 5xx instead of rebuilding state","Keep tokens fresh for operations longer than the token TTL"],"tags":["openstack","neutron","floating-ip","port","api-error"],"backgroundTag":"neutron-api-list-failed","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"}