kubernetes/kops · error

failed to list pools

Error message

failed to list pools: %v

What it means

Wraps a failure from the Octavia v2 pools.List paginated API call inside listPools. The underlying gophercloud error (auth, endpoint, HTTP status) is embedded via %v after readBackoff retries are exhausted.

Solutions

  1. Read the wrapped inner error to identify auth vs endpoint vs 5xx
  2. Refresh credentials and confirm the token has load-balancer:list permission in the target project
  3. Check Octavia service health and endpoint registration in the catalog
  4. Retry later if the API is mid-upgrade or rate limited

Example fix

null
Defensive patterns

Strategy: retry

Validate before calling

// ensure LB service exists in catalog before calling
client := cloud.LoadBalancerClient()
if client == nil { return errors.New("no LB client") }

Try / catch

pools, err := cloud.ListPools(opts)
if err != nil {
	var se gophercloud.ErrDefault500
	if errors.As(err, &se) || strings.Contains(err.Error(), "503") {
		// Octavia outage: back off and retry later
	}
	return fmt.Errorf("listing pools: %w", err)
}

Prevention

When it happens

Trigger: v2pools.List(c.LoadBalancerClient(), opts).AllPages(context.TODO()) errors: authentication failure, missing lbaas endpoint in catalog, 403 on project scope, Octavia outage, or network failure — repeated across readBackoff attempts then returned.

Common situations: Expired Keystone token mid-operation; project lacks access to load-balancer service; Octavia API returning 500 during upgrades; DNS/resolution failure to the internal endpoint.

Related errors


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

Appendix: source

Thrown at upup/pkg/fi/cloudup/openstack/loadbalancer.go:497

		}
		return memberList, err
	}
	return memberList, nil
}

func (c *openstackCloud) ListPools(opts v2pools.ListOpts) (poolList []v2pools.Pool, err error) {
	return listPools(c, opts)
}

func listPools(c OpenstackCloud, opts v2pools.ListOpts) (poolList []v2pools.Pool, err error) {
	if c.LoadBalancerClient() == nil {
		return poolList, fmt.Errorf("loadbalancer support not available in this deployment")
	}

	done, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {
		poolPage, err := v2pools.List(c.LoadBalancerClient(), opts).AllPages(context.TODO())
		if err != nil {
			return false, fmt.Errorf("failed to list pools: %v", err)
		}
		poolList, err = v2pools.ExtractPools(poolPage)
		if err != nil {
			return false, fmt.Errorf("failed to extract pools: %v", err)
		}
		return true, nil
	})
	if !done {
		if err == nil {
			err = wait.ErrWaitTimeout
		}
		return poolList, err
	}
	return poolList, nil
}

func (c *openstackCloud) ListListeners(opts listeners.ListOpts) (listenerList []listeners.Listener, err error) {
	return listListeners(c, opts)

View on GitHub (pinned to 4c8573c808)