CAPM3 v1.6.0 cluster deployment using bond interfaces is failing due to missing bondXmitHashPolicy #1437
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
triage/accepted
Indicates an issue is ready to be actively worked on.
What steps did you take and what happened:
[A clear and concise description on how to REPRODUCE the bug.]
In Project Sylva we're maintaining a helm chart sylva-capi-cluster to create CAPI manifests definitions for clusters (not using clusterctl) and since upgrading to cluster-api-provider-metal3/releases/tag/v1.6.0 (through a Kustomize and GitOps way in capm3 unit we've noticed the following error:
when we feed a CAPI management cluster with a manifest like:
Metal3DataTemplate/my-rke2-capm3-cp-metadata-30e3e5cc86 (click to expand)
Upon researching upstream, we found out that
Metal3DataTemplate.spec.networkData.links.bonds[*].bondXmitHashPolicy
option was introduced in upstream https://github.com/metal3-io/cluster-api-provider-metal3/pull/708/files and landed in thisv1.6.0
tag.Next thing is just a supposition, it might very well be wrong:
Based on
cluster-api-provider-metal3/api/v1beta1/metal3datatemplate_types.go
Lines 249 to 252 in 14830be
+optional
directive (but no presence ofomitempty
anywhere in https://github.com/metal3-io/cluster-api-provider-metal3/pull/708/files if I read https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required; mentioning I'm a novice in Go), this field is maybe marked as optional so users can choose to omit it when defining instances of the custom resource, and the default value (if any) or a zero value will be used.So I'm assuming the problem to be this default value, as in Go, when a string field is not initialized, its zero value is an empty string (""), and unless it's set by the controller logic when it processes the custom resource (which doesn't seem to be the case based on the referenced PR), this default value is not included in the supported values: "layer2", "layer3+4", "layer2+3".
What did you expect to happen:
Well, ideally the CAPM3 controller should have set a default or maybe we need to mention this as a breaking change in cluster-api-provider-metal3/releases/tag/v1.6.0 🤔
For us it's not a blocker, we're just adding the field in the helm chart, but we thought it should be reported to the community, as maybe others would fall in the same situation? Or maybe clusterctl is adding it?
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
v1.6.1
v1.6.0
kubectl version
):v1.26.9
(orv1.26.9+rke2r1
)/kind bug
The text was updated successfully, but these errors were encountered: