kubernetes/kops · error

failed to list layer 3 floating ips: %v

Error message

failed to list layer 3 floating ips: %v

What it means

Find in floatingip.go:162 wraps errors from cloud.ListL3FloatingIPs when looking up a FloatingIP task by its Description (the task Name) rather than by port ID. It means the Neutron l3 floatingip list-by-description call errored; an empty result is NOT an error (returns nil,nil so the task will be created).

Source

Thrown at upup/pkg/fi/cloudup/openstacktasks/floatingip.go:162

		}
		if fip == nil {
			return nil, nil
		}
		actual := &FloatingIP{
			Name:      new(fip.Description),
			ID:        new(fip.ID),
			LB:        e.LB,
			Lifecycle: e.Lifecycle,
		}
		e.ID = actual.ID
		return actual, nil
	}
	fipname := fi.ValueOf(e.Name)
	fips, err := cloud.ListL3FloatingIPs(l3floatingip.ListOpts{
		Description: fipname,
	})
	if err != nil {
		return nil, fmt.Errorf("failed to list layer 3 floating ips: %v", err)
	}

	for _, fip := range fips {
		if fip.Description == fi.ValueOf(e.Name) {
			actual := &FloatingIP{
				ID:        new(fips[0].ID),
				Name:      e.Name,
				IP:        new(fip.FloatingIP),
				Lifecycle: e.Lifecycle,
			}
			e.ID = actual.ID
			e.IP = actual.IP
			return actual, nil
		}
	}

	return nil, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped error for HTTP status; re-authenticate or fix project scope for 401/403.
  2. Confirm `openstack floating ip list` works with the same credentials outside kops.
  3. For 5xx/rate limiting, wait and rerun the kops command.
  4. Verify Neutron's floatingip list filtering by description is supported in your OpenStack release.
Defensive patterns

Strategy: try-catch

Validate before calling

// verify list-by-description works before the task runs
_, err := cloud.ListL3FloatingIPs(l3floatingip.ListOpts{Description: taskName, Limit: 1})
if err != nil {
    return fmt.Errorf("cannot list floating ips by description: %w", err)
}

Type guard

func isNeutronListFailure(err error) bool {
    var gerr gophercloud.ErrUnexpectedResponseCode
    return errors.As(err, &gerr) && gerr.Actual >= 400
}

Try / catch

actual, err := e.Find(ctx)
if err != nil {
    if isNeutronListFailure(err) && errors.Is(err, context.DeadlineExceeded) {
        return nil, nil // treat transient timeout as not-found; recreate
    }
    return nil, err
}

Prevention

When it happens

Trigger: Neutron rejects the list call: 401 expired token, 403 insufficient policy, 400 bad filter, or 5xx/rate-limit from the Neutron service.

Common situations: Keystone token expiry during a long-running update; project scoping mismatch so the FIPs live in another tenant; Neutron outage; API policy changes in newer OpenStack releases restricting floatingip listing.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/f6a42f1282e4c1ef. Report an issue: GitHub.