kubernetes/kops · error

error creating PoolMonitor: %v

Error message

error creating PoolMonitor: %v

What it means

This error is wrapped by PoolMonitor.RenderOpenstack when the call to the Openstack Octavia load-balancer pool monitor creation API (via t.Cloud.CreatePoolMonitor) fails. The liveness monitor (health check) for a load balancer pool could not be created with the supplied delay/timeout/retry settings. The original Openstack API error is preserved in the %v wrapping.

Source

Thrown at upup/pkg/fi/cloudup/openstacktasks/poolmonitor.go:115

	}
	return nil
}

func (_ *PoolMonitor) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, changes *PoolMonitor) error {
	if a == nil {
		klog.V(2).Infof("Creating PoolMonitor with Name: %q", fi.ValueOf(e.Name))

		poolMonitor, err := t.Cloud.CreatePoolMonitor(monitors.CreateOpts{
			Name:           fi.ValueOf(e.Name),
			PoolID:         fi.ValueOf(e.Pool.ID),
			Type:           monitors.TypeTCP,
			Delay:          10,
			Timeout:        5,
			MaxRetries:     3,
			MaxRetriesDown: 3,
		})
		if err != nil {
			return fmt.Errorf("error creating PoolMonitor: %v", err)
		}
		e.ID = new(poolMonitor.ID)
	}
	return nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped inner error for the actual Octavia API failure cause
  2. Verify the Octavia service is available in the cloud and the pool exists before monitor creation
  3. Check project quotas for load balancer health monitors
  4. Re-run kops; transient Openstack API failures are common and Render is retried at a higher level
  5. Verify cloud credentials and endpoint configuration (clouds.yaml / OS_* env vars)

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure octavia is reachable before applying
// openstack loadbalancer list  (via SDK: loadbalancers.List)
if err := verifyOctaviaAvailable(cloud); err != nil {
    return fmt.Errorf("octavia unavailable, skipping pool monitor creation: %w", err)
}

Try / catch

err := t.Cloud.CreatePoolMonitor(opt)
if err != nil {
    return fmt.Errorf("error creating PoolMonitor: %v", err)
}
// treat as retryable unless the inner error is a 4xx validation/quota error

Prevention

When it happens

Trigger: Cluster spec defines a load balancer health monitor and RenderOpenstack invokes CreatePoolMonitor with Delay=10, Timeout=5, MaxRetries=3, MaxRetriesDown=3, but the Octavia API rejects or fails the request (bad pool ID, quota exceeded, auth failure, unsupported monitor type).

Common situations: Octavia service not deployed or disabled in the Openstack cloud; pool not yet created or wrong pool reference; project hit the health-monitor quota; neutron/octavia endpoint misconfigured in clouds.yaml; older Octavia versions not supporting some monitor fields.

Related errors


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