Infra Operator: Resources that are immutable must have randomly generated names.

Summary

The infra-operator produces a lot of stack traces and some resources fail to reconcile (after they are successfully created).

Detailed Description

This problem occurs on the current devel branch and is a regression compared to 0.20251103.0. It is likely caused by Merge request !3239: prevent immutable resource with static names.

This affects at least RabbitMQ credentials.

Steps to reproduce the issue

  1. deploy a cluster

Result

Relevant logs from Infra operator
yaook-infra-operator-685cdcf9f9-fffkk operator 2025-11-12 17:23:44,748    INFO  yaook.op.daemon.infra.yaook.cloud/v1.amqpusers.yaook.nova-cell1-compute-c4k8j  reconciling [ 67% (  4+  0/  6)] <yaook.op.infra.resources.DynamicSecretHandler component='optional_secret_ref'>
yaook-infra-operator-685cdcf9f9-fffkk operator 2025-11-12 17:23:44,754   ERROR  yaook.op.daemon.infra.yaook.cloud/v1.amqpusers.yaook.nova-cell1-compute-c4k8j  failed to reconcile state <yaook.op.infra.resources.DynamicSecretHandler component='optional_secret_ref'>
yaook-infra-operator-685cdcf9f9-fffkk operator Traceback (most recent call last):
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/statemachine.py", line 81, in _ensure_state
yaook-infra-operator-685cdcf9f9-fffkk operator     await state.reconcile(
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/resources/k8s.py", line 884, in reconcile
yaook-infra-operator-685cdcf9f9-fffkk operator     await self.get_resource_interface(ctx).create(
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/interfaces.py", line 353, in create
yaook-infra-operator-685cdcf9f9-fffkk operator     raise ValueError("Resources that are immutable must have "
yaook-infra-operator-685cdcf9f9-fffkk operator ValueError: Resources that are immutable must have randomly generated names.
yaook-nova-compute-operator-5956f9f757-prr6r operator 2025-11-12 17:23:44,763    INFO  yaook.op.daemon.compute.yaook.cloud/v1.novacomputenodes.yaook.maxh-test18-compute-0-mwjc4-vdpgl-x67xf  reconciling [ 79% ( 27+  0/ 34)] <yaook.statemachine.resources.certmanager.EmptyTlsSecret component='vnc_backend_certificate_secret'>
yaook-infra-operator-685cdcf9f9-fffkk operator 2025-11-12 17:23:44,768   ERROR  yaook.op.tasks  task TaskItem(func=<bound method OperatorDaemon._reconcile_cr of <yaook.op.daemon.OperatorDaemon object at 0x74680f1fb050>>, data=(<CustomResource amqpusers.infra.yaook.cloud/v1>, 'yaook', 'nova-cell1-compute-c4k8j')) failed. retrying in 31.89916992014585s
yaook-infra-operator-685cdcf9f9-fffkk operator Traceback (most recent call last):
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/op/tasks.py", line 375, in run_next_task
yaook-infra-operator-685cdcf9f9-fffkk operator     requeue = await func(*data)
yaook-infra-operator-685cdcf9f9-fffkk operator               ^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/op/daemon.py", line 771, in _reconcile_cr
yaook-infra-operator-685cdcf9f9-fffkk operator     await cr_obj.reconcile(ctx, generation)
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/customresource.py", line 315, in reconcile
yaook-infra-operator-685cdcf9f9-fffkk operator     blocking = await self.sm.ensure(ctx)
yaook-infra-operator-685cdcf9f9-fffkk operator                ^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/statemachine.py", line 155, in ensure
yaook-infra-operator-685cdcf9f9-fffkk operator     ready = await self._ensure_state(state, ctx)
yaook-infra-operator-685cdcf9f9-fffkk operator             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/statemachine.py", line 81, in _ensure_state
yaook-infra-operator-685cdcf9f9-fffkk operator     await state.reconcile(
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/tracing.py", line 63, in wrapper
yaook-infra-operator-685cdcf9f9-fffkk operator     return await function(*args, **kwargs)
yaook-infra-operator-685cdcf9f9-fffkk operator            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/resources/k8s.py", line 884, in reconcile
yaook-infra-operator-685cdcf9f9-fffkk operator     await self.get_resource_interface(ctx).create(
yaook-infra-operator-685cdcf9f9-fffkk operator   File "/usr/local/lib/python3.11/site-packages/yaook/statemachine/interfaces.py", line 353, in create
yaook-infra-operator-685cdcf9f9-fffkk operator     raise ValueError("Resources that are immutable must have "
yaook-infra-operator-685cdcf9f9-fffkk operator ValueError: Resources that are immutable must have randomly generated names.

Expected Result

Additional Information

Resolution

Proposal

To be discussed.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this issue are to be interpreted in the spirit of RFC 2119, even though we're not technically doing protocol design.

)
Assignee Loading
Time tracking Loading