kubernetes/kubernetes · error

failed to init resourcepoolstatusrequest controller: %w

Error message

failed to init resourcepoolstatusrequest controller: %w

What it means

Thrown in newResourcePoolStatusRequestController (resource.go:125) when resourcepoolstatusrequest.NewController returns an error during startup. This controller (gated by DRAResourcePoolStatus feature gate) reconciles ResourcePoolStatusRequests against ResourceSlices/ResourceClaims/DeviceTaintRules informers; construction fails if those informers/APIs are unavailable or its internal validation rejects the inputs. The %w wraps the cause.

Source

Thrown at cmd/kube-controller-manager/app/resource.go:125

	}
}

func newResourcePoolStatusRequestController(ctx context.Context, controllerContext ControllerContext, controllerName string) (Controller, error) {
	client, err := controllerContext.NewClient("resourcepoolstatusrequest-controller")
	if err != nil {
		return nil, err
	}

	controller, err := resourcepoolstatusrequest.NewController(
		ctx,
		client,
		controllerContext.InformerFactory.Resource().V1alpha3().ResourcePoolStatusRequests(),
		controllerContext.InformerFactory.Resource().V1().ResourceSlices(),
		controllerContext.InformerFactory.Resource().V1().ResourceClaims(),
		controllerContext.InformerFactory.Resource().V1().DeviceTaintRules(),
	)
	if err != nil {
		return nil, fmt.Errorf("failed to init resourcepoolstatusrequest controller: %w", err)
	}

	return newControllerLoop(func(ctx context.Context) {
		controller.Run(ctx, 1) // Single worker is sufficient for this controller
	}, controllerName), nil
}

View on GitHub (pinned to b882c60b40)

Solutions

  1. Verify the API server serves ResourcePoolStatusRequests (v1alpha3) and the Resource v1 types the controller depends on.
  2. Ensure feature-gate DRAResourcePoolStatus is enabled consistently on API server and KCM, and that the API server version matches.
  3. Inspect the wrapped %w for the exact list/watch/registration error and resolve it.
  4. Disable the controller if the feature is not needed: turn off the DRAResourcePoolStatus feature gate.

Example fix

// before: feature on, API missing
--feature-gates=DRAResourcePoolStatus=true
// after
--feature-gates=DRAResourcePoolStatus=false
Defensive patterns

Strategy: try-catch

Validate before calling

// Confirm the alpha API exists before enabling DRAResourcePoolStatus
_, err := discoveryClient.ServerResourcesForGroupVersion("resource.k8s.io/v1alpha3")
if err != nil { /* alpha API absent; keep feature gate off */ }

Try / catch

controller, err := resourcepoolstatusrequest.NewController(ctx, client, rpsrInf, slicesInf, claimsInf, taintsInf)
if err != nil {
    return nil, fmt.Errorf("failed to init resourcepoolstatusrequest controller: %w", err)
}

Prevention

When it happens

Trigger: Starting KCM with the DRAResourcePoolStatus feature gate enabled but the Resource v1alpha3 ResourcePoolStatusRequests API (or the v1 ResourceSlices/ResourceClaims/DeviceTaintRules APIs) is not served by the API server, or the informers are not registered in the shared factory.

Common situations: Alpha DRA feature enabled on a cluster whose API server does not yet serve the ResourcePoolStatusRequests v1alpha3 endpoint; API server/KCM version skew where the v1alpha3 group was renamed or removed; informer factory built without the resource API registered.

Related errors


AI-assisted analysis of kubernetes/kubernetes@b882c60b40 (2026-08-07). Data as JSON: /api/errors/ad4c4c528526b7cc. Report an issue: GitHub.