Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point2Point IPAM adds ip addr when it is not expected #1680

Open
Ex4amp1e opened this issue Oct 14, 2024 · 0 comments
Open

Point2Point IPAM adds ip addr when it is not expected #1680

Ex4amp1e opened this issue Oct 14, 2024 · 0 comments

Comments

@Ex4amp1e
Copy link
Contributor

Expected Behavior

From point2point ipam Readme:

IPAM service should be idempotent, so if we have allocated some IP addresses for the request and request type (p2p,
subnet) hasn't changed, and allocated addresses are still not excluded by the excluded prefixes, we should return the
same addresses for the same connection.

Current Behavior

When NSE1 is replaced with NSE2 with another CIDR, NSE2 with polity ipam policy adds (not replaces) new ip addrs in ipcontext for: src_ip_addrs, dst_ip_addrs, src_routes:prefix, dst_routes:prefix

In the result client contains old ip addr in interface(expected), but also get routes configured and working connection for the addr form the new NSE's CIDR

Steps to Reproduce

  1. Deploy NSE1 and 2 clients

NSE1 config:

        - name: NSM_CIDR_PREFIX
          value: 172.16.1.0/29
  1. Remove NSE1, deploy NSE2

NSE2 config:

        - name: NSM_CIDR_PREFIX
          value: 172.16.2.0/29,2001:db8::/116 

Note: the issue has been reproduced with dual-stack NSE2 and 2 clients, but looks like it is not required to have 2 clients and just having new ipv4 CIDR on NSE2 and 1 client with default point2point IPAM will be required to reproduce the issue.

  1. Check client's interfaces, e.g.:
kubectl exec pods/alpine-1 -n ns-ipam-policies -- ifconfig
  1. Get client's routes, e.g.:
kubectl exec pods/alpine-1 -n ns-ipam-policies -- ip r show dev nsm-1

Unexpected to have route from NSE2 CIDR since client doesn't have interface for it and it is not expected. But it is also can be pinged successfully.

Context

  • Kubernetes Version: 1.28 - 1 control plane + 2 worker was used

Failure Logs

point2point.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant