Problem
A Reconfigure OpsRequest that targets a component which does not support parameters (its ComponentParameter CR does not exist and never will) retries forever instead of failing with a clear message. The OpsRequest stays in Creating/Running indefinitely and the ops controller keeps requeueing on a bare NotFound error, giving the user no signal about what is wrong.
Scenario
- Create a cluster with a component whose
ComponentDefinition declares no config templates (spec.configs empty), or whose configs resolve to no valid ParametersDefinition. For such components the componentdrivenparameter controller intentionally never creates a ComponentParameter object (controllers/parameters/componentdrivenparameter_controller.go, buildComponentParameter returns nil when len(cmpd.Spec.Configs) == 0 or !parameters.HasValidParameterTemplate(...)).
- Wait for the cluster to be
Running.
- Submit a
Reconfigure OpsRequest against that component.
Why it is deterministic
- Reconfigure requires the cluster to be in a reconfigurable phase (
FromClusterPhases: GetReconfiguringRunningPhases()), so by the time the ops runs the parameter controllers have had their chance to create the CR.
- The
componentdrivenparameter controller creates ComponentParameter only for components whose ComponentDefinition declares config templates that resolve to valid ParametersDefinitions. For a component that does not, the CR will never appear — the retry can never succeed.
Framework mechanics (root cause)
pkg/operations/reconfigure.go getRunningComponentParameter() returns the bare NotFound error from cli.Get of the ComponentParameter CR. That error is reached from both paths:
- Action path:
Action() → applyReconfigureToParameters() → getRunningComponentParameter()
- ReconcileAction path:
ReconcileAction() → aggregatePhase() → getRunningComponentParameter()
The ops manager (pkg/operations/ops_manager.go) only transitions an OpsRequest to Failed on errors classified as fatal (intctrlutil.IsTargetError(err, intctrlutil.ErrorTypeFatal)); any plain error is returned to controller-runtime and requeued. Since a bare NotFound is a plain error, both paths requeue infinitely.
Expected behavior
When the target component provably does not support parameters (its ComponentDefinition has no config templates resolving to valid parameter definitions), the OpsRequest should fail fast with a message like:
component <name> does not support reconfigure: ComponentParameter not found
while a genuinely transient missing CR (e.g. controller creation lag for a component that does support parameters) should keep the current retry behavior.
Problem
A
ReconfigureOpsRequest that targets a component which does not support parameters (itsComponentParameterCR does not exist and never will) retries forever instead of failing with a clear message. The OpsRequest stays inCreating/Runningindefinitely and the ops controller keeps requeueing on a bareNotFounderror, giving the user no signal about what is wrong.Scenario
ComponentDefinitiondeclares no config templates (spec.configsempty), or whose configs resolve to no validParametersDefinition. For such components thecomponentdrivenparametercontroller intentionally never creates aComponentParameterobject (controllers/parameters/componentdrivenparameter_controller.go,buildComponentParameterreturns nil whenlen(cmpd.Spec.Configs) == 0or!parameters.HasValidParameterTemplate(...)).Running.ReconfigureOpsRequest against that component.Why it is deterministic
FromClusterPhases: GetReconfiguringRunningPhases()), so by the time the ops runs the parameter controllers have had their chance to create the CR.componentdrivenparametercontroller createsComponentParameteronly for components whoseComponentDefinitiondeclares config templates that resolve to validParametersDefinitions. For a component that does not, the CR will never appear — the retry can never succeed.Framework mechanics (root cause)
pkg/operations/reconfigure.gogetRunningComponentParameter()returns the bareNotFounderror fromcli.Getof theComponentParameterCR. That error is reached from both paths:Action()→applyReconfigureToParameters()→getRunningComponentParameter()ReconcileAction()→aggregatePhase()→getRunningComponentParameter()The ops manager (
pkg/operations/ops_manager.go) only transitions an OpsRequest toFailedon errors classified as fatal (intctrlutil.IsTargetError(err, intctrlutil.ErrorTypeFatal)); any plain error is returned to controller-runtime and requeued. Since a bareNotFoundis a plain error, both paths requeue infinitely.Expected behavior
When the target component provably does not support parameters (its
ComponentDefinitionhas no config templates resolving to valid parameter definitions), the OpsRequest should fail fast with a message like:while a genuinely transient missing CR (e.g. controller creation lag for a component that does support parameters) should keep the current retry behavior.