-
Notifications
You must be signed in to change notification settings - Fork 451
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
[BUG] wrong ippool allocation #4687
Comments
Hey @dgsponer! I'm here to help you with any bugs, questions, or contributions you have for Kube-OVN. Let's tackle this issue together while we wait for a human maintainer to join in. The issue you're experiencing with Kube-OVN version v1.12.28 seems to be related to the selection of the wrong IP pool when multiple subnets and IP pools are present in the same VPC. This behavior might be influenced by the order in which the IP pools are created. Kube-OVN handles IP pool selection by checking namespace labels and selectors to determine the appropriate subnet and IP pool. If a subnet is explicitly bound to a namespace or matches namespace label selectors, it is considered for that namespace. The IP pool selection process involves checking if an IP pool is explicitly associated with the namespace by looking at the In your case, it seems that the IP pool selection might not be correctly associating the IP pool with the intended subnet due to the creation order. This could be a limitation or bug in the current version of Kube-OVN. To address this, you might want to ensure that the namespace and subnet configurations are correctly set up to explicitly bind the correct IP pool to the intended subnet. Additionally, reviewing the logic in the IP pool selection process might help identify any potential misconfigurations or bugs that could be causing this behavior. |
I cannot reproduce it. Please provide more detailed information. |
here the manifest. ovn.kubernetes.io/logical_switch: subnet-vpc-test-001 -> ovn.kubernetes.io/logical_switch: subnet-vpc-test-002 and i got this again:
The manifest
|
as sidenote: the pod will not come up. delete both ippools and rollout a restart on the deployment. |
Why do you add the namespace into all the subnet/ippool definitions? Is there any special requirement? |
IPPool is designed to limit ip addresses assigned to a namespace/workload. Your kind of usage is not supported yet. |
we create frr routers for some usecases. this is why we add the namespace, to prevent other namespaces to consume it. |
what is working: what is understand from the ippool, the ipppool have the whitelist behavior, the subnet the blacklist behavior. Is this right? |
add as next info: and change then to the ip pool works like a charm and select the right logical_switch. the controller just select the wrong pool with the logical_switch definition. |
Support for subnets with a |
hey @zhangzujian, would you mind if I take a look at this one? |
PR is ready to be reviewed, I have spent some time to add an e2e test case as well |
Kube-OVN Version
v1.12.28
Kubernetes Version
v1.31.1
Operation-system/Kernel Version
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
6.1.0-25-amd64
Description
with two ore more subnets and assigned ippools in the same vpc, kubeone tooks the wrong ippool, depending, which ippool is created first.
Steps To Reproduce
create 1 namespace
add this ressources in the new namespace
create 1 vpc
create 2 subnets (001 and 002)
create 2 ippools (001 assigned to subnet 001, 002 assigned to subnet 002)
create a deployment with annotation logical_router to 001, it will works.
change now the logical router to the other subnet 002, it will fail
Current Behavior
depended of order the cr are added.
ippool ippool-vpc-test-001 in subnet subnet-vpc-test-002
Expected Behavior
the correct ippool wil be assigned
ippool ippool-vpc-test-001 in subnet subnet-vpc-test-001
The text was updated successfully, but these errors were encountered: