Circular dependency error when deploying CAPO workload cluster with additional networks
Summary
Circular dependency error when deploying CAPO workload cluster that has secondary networks.
I have seen a recent circular dependency issue here.
Steps to reproduce
From sylva-core main branch, deploy a workload cluster having similar values.yaml setup:
cluster:
capi_providers:
infra_provider: capo
bootstrap_provider: cabpr
capo:
os_image_selector:
os: ubuntu
hardened: true
ssh_key_name: ssh_key
network_id: f9502f04-44f5-48f5-98e0-9dfb6c773b3b
flavor_name: B1.large
rootVolume:
diskSize: 100
volumeType: ceph_ssd
control_plane:
network_interfaces:
secondary:
network:
id: aed056bf-1916-45f2-890e-c8027c6b5b96
vnicType: normal
What is the current bug behavior?
For a similar values.yaml that is working for a CAPO mgmt cluster, a deployment of a workload cluster is returning an error for a workload cluster, specifying an additional network under cluster.control_plane.network_interfaces:
$ ./apply-workload-cluster.sh environment-values/workload-clusters/wc1-rke2-capo-vlado
🔎 Validate input files
🔑 management-cluster-kubeconfig refresh
check if management-cluster-kubeconfig local file needs a refresh... -> not needed
📜 Install a sylva-units Helm release for workload cluster wc1-rke2-capo-vlado
[INFO] Using 2dd36260ca42f3ffc128366496574056fa66e682
[INFO] Detected branch: main
namespace/wc1-rke2-capo-vlado unchanged
[INFO] Using 2dd36260ca42f3ffc128366496574056fa66e682
[INFO] Detected branch: main
namespace/wc1-rke2-capo-vlado unchanged
configmap/sylva-units-values-h9bbb9h7ct created
secret/sylva-units-secrets-8fmdtgcmc9 configured
sylvaunitsrelease.unitsoperator.sylva/sylva-units configured
🎯 Trigger reconciliation of units
Wait for pre-upgrade units to be up-to-date...
sylvaunitsrelease.unitsoperator.sylva/sylva-units condition met
sylvaunitsrelease.unitsoperator.sylva/sylva-units condition met
Wait for sylva-units HelmRelease to be up-to-date...
sylvaunitsrelease.unitsoperator.sylva/sylva-units condition met
sylvaunitsrelease.unitsoperator.sylva/sylva-units condition met
Wait for sylva-units HelmRelease to be ready...
watching resources on namespace: wc1-rke2-capo-vlado
✓ GitRepository/sylva-units-f1643d30 - Resource is ready
✓ HelmChart/wc1-rke2-capo-vlado-sylva-units - Resource is ready
⢎⡠ HelmRelease/sylva-units - InstallFailed - Helm install failed for release wc1-rke2-capo-vlado/sylva-units with chart sylva-units@0.0.0-git+2dd36260ca42: execution error at (sylva-units/templates/units.yaml:17:40): unit cluster is
involved in a circular dependency:cluster-machines-ready -> cluster -> capo-gateway-validation -> capo-orc -> calico-ready -> calico -> calico-crd -> cluster-reachable -> cluster
Error: exiting as condition "reason" equals "InstallFailed" in unit HelmRelease/sylva-units, message: Helm install failed for release wc1-rke2-capo-vlado/sylva-units with chart sylva-units@0.0.0-git+2dd36260ca42: execution error at
(sylva-units/templates/units.yaml:17:40): unit cluster is involved in a circular dependency:
cluster-machines-ready -> cluster -> capo-gateway-validation -> capo-orc -> calico-ready -> calico -> calico-crd -> cluster-reachable -> cluster
What is the expected correct behavior?
Workload cluster should be deployed without errors.