kubernetes/kops · error
failed to create pool: %v
Error message
failed to create pool: %v
What it means
Wrapped failure from v2pools.Create in createPool's writeBackoff loop: Octavia rejected pool creation (or returned unextractable data). The retry loop keeps the last attempt's error, which is embedded via %v.
Source
Thrown at upup/pkg/fi/cloudup/openstack/loadbalancer.go:443
}
return association, err
}
return association, nil
}
func (c *openstackCloud) CreatePool(opts v2pools.CreateOpts) (pool *v2pools.Pool, err error) {
return createPool(c, opts)
}
func createPool(c OpenstackCloud, opts v2pools.CreateOpts) (pool *v2pools.Pool, err error) {
if c.LoadBalancerClient() == nil {
return nil, fmt.Errorf("loadbalancer support not available in this deployment")
}
done, err := vfs.RetryWithBackoff(writeBackoff, func() (bool, error) {
pool, err = v2pools.Create(context.TODO(), c.LoadBalancerClient(), opts).Extract()
if err != nil {
return false, fmt.Errorf("failed to create pool: %v", err)
}
return true, nil
})
if !done {
if err == nil {
err = wait.ErrWaitTimeout
}
return pool, err
}
return pool, nil
}
func (c *openstackCloud) ListPoolMembers(poolID string, opts v2pools.ListMembersOpts) (memberList []v2pools.Member, err error) {
return listPoolMembers(c, poolID, opts)
}
func listPoolMembers(c OpenstackCloud, poolID string, opts v2pools.ListMembersOpts) (memberList []v2pools.Member, err error) {
if c.LoadBalancerClient() == nil {View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped %v error for HTTP status: 409 means parent object pending — retry after provisioning settles (the loop already retries; ensure backoff is long enough).
- Validate CreateOpts against your Octavia version (allowed lb_algorithm values ROUND_ROBIN/LEAST_CONNECTIONS/SOURCE_IP; supported protocols).
- Check quotas for pools (`openstack quota show`) and the listener_id/loadbalancer_id values passed in opts.
- Confirm the Octavia provider (e.g. amphorae) can actually provision; image/amp failures surface as creation errors.
Example fix
// before
opts := v2pools.CreateOpts{ListenerID: listenerID, Protocol: "HTTP", LBMethod: "round_robin"} // invalid enum casing
// after
opts := v2pools.CreateOpts{ListenerID: listenerID, Protocol: "HTTP", LBMethod: v2pools.LBMethodRoundRobin} Defensive patterns
Strategy: retry
Validate before calling
for _, allowed := range []string{"ROUND_ROBIN", "LEAST_CONNECTIONS", "SOURCE_IP"} {
if opts.LBMethod == allowed {
goto ok
}
}
return fmt.Errorf("invalid lb_algorithm %q", opts.LBMethod) Try / catch
pool, err := cloud.CreatePool(opts)
if err != nil {
if strings.Contains(err.Error(), "409") || strings.Contains(err.Error(), "Conflict") {
return retryAfterLBSettles(opts) // parent LB/listener pending
}
if strings.Contains(err.Error(), "quota") {
return ErrQuotaExceeded
}
return fmt.Errorf("create pool failed: %w", err)
} Prevention
- Use v2pools.LBMethod* constants instead of raw strings for LBMethod/Protocol.
- Ensure the parent listener/loadbalancer is ACTIVE before creating pools.
- Check quotas and provider capacity (amphorae) before large batch creations.
When it happens
Trigger: CreatePool called with invalid CreateOpts (unknown listener_id, unsupported LB algorithm/protocol, wrong provider), 409 while the parent LB/listener is in PENDING state, quota exceeded, or 404 listener/loadbalancer vanished.
Common situations: Invalid lb algorithms or protocols in the cluster spec for the deployed Octavia version; rapid creation racing Octavia provisioning (PENDING states); quota limits on pools/listeners in shared projects.
Related errors
- Error getting load balancer stats %v
- failed to build load balancer client: %w
- cluster configured to use octavia, but router was not config
- error building lb client: %w
- loadbalancer API versions not found
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/7a5d26b9c40bf383.
Report an issue: GitHub.