resolve workload cluster circular unit dependency chain involving rancher-fleet-agent-drain-fix
Closes #3229 (closed)
The circular dependency described in #3229 (closed), caused by !6212 (merged), is: calico -> calico-crd -> cluster-reachable -> cluster -> rancher-fleet-agent-drain-fix --(via base-deps)-> calico-ready -> calico). It is present in a deploy-workload-cluster setup because the cluster depends on rancher-fleet-agent-drain-fix. In fact, at deploy stage, this dependency is not useful or desirable. This dependency is important only on upgrade to ensure that the fleet-agent fix is in place before the rolling update), and on upgrades it does not cause a dependency loop because the base-deps dependency on calico isn't enabled.
Issue #3229 (closed) wasn't catched by unit testing because in the mock mgmt_cluster_state values, we don't enable rancher. This MR fixes this issue as well (in a separate commit).
The unit tests is sufficient to validate that this MR solves #3229 (closed):
- with the adjusted mock values and without the circular dep fix,
sylva-units:helm-template-yamllintfails as in #3229 (closed)
$ tools/validation/helm-template-yamllint.sh sylva-units '*workload-cluster'
--------------- Checking values from test-values/workload-cluster with 'helm template ' and 'yamllint' ...
running: helm template sylva-units charts/sylva-units --values charts/sylva-units/test-values/workload-cluster/shared-settings-mock.values.yaml --values charts/sylva-units/test-values/workload-cluster/workload-cluster.values.yaml --values charts/sylva-units/test-values/workload-cluster/zz-sriov-values.yaml
Error: execution error at (sylva-units/templates/units.yaml:17:40): unit calico is involved in a circular dependency:
cluster-machines-ready -> calico -> calico-crd -> cluster-reachable -> cluster -> rancher-fleet-agent-drain-fix -> calico-ready -> calico
- with the adjusted mock values and with the circular dep fix,
sylva-units:helm-template-yamllintsucceeds
$ tools/validation/helm-template-yamllint.sh sylva-units '*workload-cluster'
--------------- Checking values from test-values/workload-cluster with 'helm template ' and 'yamllint' ...
running: helm template sylva-units charts/sylva-units --values charts/sylva-units/test-values/workload-cluster/shared-settings-mock.values.yaml --values charts/sylva-units/test-values/workload-cluster/workload-cluster.values.yaml --values charts/sylva-units/test-values/workload-cluster/zz-sriov-values.yaml
OK
With the above in mind, I think no additional testing is required.
CI configuration
Below you can choose test deployment variants to run in this MR's CI.
Click to open to CI configuration
Legend:
| Icon | Meaning | Available values |
|---|---|---|
| Infra Provider |
capd, capo, capm3
|
|
| Bootstrap Provider |
kubeadm (alias kadm), rke2, okd, ck8s
|
|
| Node OS |
ubuntu, suse, na, leapmicro
|
|
| Deployment Options |
light-deploy, dev-sources, ha, misc, maxsurge-0, logging, no-logging, cilium
|
|
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
-
🎬 preview☁️ capd🚀 kadm🐧 ubuntu -
🎬 preview☁️ capo🚀 rke2🐧 suse -
🎬 preview☁️ capm3🚀 rke2🐧 ubuntu -
☁️ capd🚀 kadm🛠️ light-deploy🐧 ubuntu -
☁️ capd🚀 rke2🛠️ light-deploy🐧 suse -
☁️ capo🚀 rke2🐧 suse -
☁️ capo🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.5.x🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.5.x🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 ck8s🐧 ubuntu -
☁️ capm3🚀 kadm🎬 rolling-update-no-wkld🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🎬 wkld-k8s-upgrade🛠️ ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2🎬 sylva-upgrade-from-1.5.x🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade-from-1.5.x🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main
Global config for deployment pipelines
-
autorun pipelines -
allow failure on pipelines -
record sylvactl events
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare disabled, deployment pipelines will need manual triggering but will be blocking the pipeline
Be aware: after configuration change, pipeline is not triggered automatically.
Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.