-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
What happened?
When defining an IPPool with exclusions to restrict IP allocation to a narrow range, NV-IPAM still allocates addresses from the excluded space. The status.allocations field shows IPs handed out from inside the exclusion ranges, suggesting the controller is not honoring exclusions.
What did you expect to happen?
Created this IpPool CR. This should leave only 10.117.127.32 – 10.117.127.127 (96 usable addresses) available for allocation.
cat <<EOF | kubectl apply -f -
apiVersion: nv-ipam.nvidia.com/v1alpha1
kind: IPPool
metadata:
name: hostdev-pool-a-su-1
namespace: nvidia-network-operator
spec:
subnet: 10.117.112.0/20
perNodeBlockSize: 8
gateway: 10.117.112.1
exclusions:
# use 96 IPs between the range of 10.117.127.32 to 10.117.127.127
# exclude everything before 10.117.127.31
- startIP: 10.117.112.1
endIP: 10.117.127.31
# exclude everything after 10.117.127.128
- startIP: 10.117.127.128
endIP: 10.117.127.255
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/worker
operator: Exists
Expected Behavior:
Allocations should come only from the allowed range (10.117.127.32 – 10.117.127.127).
No IPs inside the excluded ranges should ever appear in .status.allocations.
Actual Behavior:
status.allocations contains blocks from the excluded space:
kubectl get ippool.nv-ipam.nvidia.com hostdev-pool-a-su-1 -o yaml -n nvidia-network-operator
apiVersion: nv-ipam.nvidia.com/v1alpha1
kind: IPPool
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"nv-ipam.nvidia.com/v1alpha1","kind":"IPPool","metadata":{"annotations":{},"name":"hostdev-pool-a-su-1","namespace":"nvidia-network-operator"},"spec":{"exclusions":[{"endIP":"10.117.127.31","startIP":"10.117.112.1"},{"endIP":"10.117.127.255","startIP":"10.117.127.128"}],"gateway":"10.117.112.1","nodeSelector":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/worker","operator":"Exists"}]}]},"perNodeBlockSize":8,"subnet":"10.117.112.0/20"}}
creationTimestamp: "2025-09-18T17:39:30Z"
generation: 2
name: hostdev-pool-a-su-1
namespace: nvidia-network-operator
resourceVersion: "4911622"
uid: 84ff5e43-4b4e-4432-b4af-f4c406314721
spec:
exclusions:
- endIP: 10.117.127.31
startIP: 10.117.112.1
- endIP: 10.117.127.255
startIP: 10.117.127.128
gateway: 10.117.112.1
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/worker
operator: Exists
perNodeBlockSize: 8
subnet: 10.117.112.0/20
status:
allocations:
- endIP: 10.117.112.8
nodeName: node-0a35d6d1
startIP: 10.117.112.1
- endIP: 10.117.112.16
nodeName: node-c74b0c94
startIP: 10.117.112.9
Reproducibility:
100% — occurs consistently
What are the minimal steps needed to reproduce the bug?
Anything else we need to know?
Component Versions
Logs
NVIDIA k8s IPAM Controller Logs (use kubectl logs $PODNAME)
Metadata
Metadata
Assignees
Labels
No labels