Skip to content

Reconfigure OpsRequest on a component without parameter support hangs forever #10545

Description

@weicao

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

  1. 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(...)).
  2. Wait for the cluster to be Running.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions