-
Notifications
You must be signed in to change notification settings - Fork 40
Description
What steps did you take and what happened:
Tried a deployment with PreAllocations
preAllocations:
extnet-ipv6: 2001:1b70:8298:a303::0005
E1216 11:35:02.680742 1 controller.go:353] "Reconciler error" err="Failed to create the missing data: Pre-allocated IP out of bond" controller="IPPoolReconciler" controllerGroup="ipam.metal3.io" controllerKind="IPPool" IPPool="namespace/netpool-extnet-ipv6" namespace="namespace" name="netpool-extnet-ipv6" reconcileID="a2357a53-90e4-4d43-b10c-be32b3627519"
E1216 11:51:16.352271 1 controller.go:353] "Reconciler error" err="Failed to create the missing data: Pre-allocated IP out of bond" controller="IPPoolReconciler" controllerGroup="ipam.metal3.io" controllerKind="IPPool" IPPool="namespace/netpool-extnet-ipv6" namespace="namespace" name="netpool-extnet-ipv6" reconcileID="47dce42c-079b-4a0d-ad63-697afffbab96"
Whereas if the PreAllocations were in canonical format, machines deployment is successful
preAllocations:
extnet-ipv6: 2001:1b70:8298:a303::5 -> successful
The validation logic does not normalize IPv6 addresses before checking them against the pool range, violating RFC 5952. The notations 0005 and 5 within a hextet represent the same hexadecimal value (0x5) and must be treated as identical.
What did you expect to happen:
Both address formats should be recognized as the same IP and pass pool validation.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
- Cluster-api version: v1.11.1
- CAPM3 version: v1.11.2
- IPAM version: v1.11.2
- Minikube version:
- environment (metal3-dev-env or other):
- Kubernetes version: (use
kubectl version):
kubectl version
Client Version: v1.35.0
Kustomize Version: v5.7.1
Server Version: v1.35.0
/kind bug