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

ip rules, gitops cleanup? #1270

Open
omlet05 opened this issue Oct 11, 2024 · 2 comments
Open

ip rules, gitops cleanup? #1270

omlet05 opened this issue Oct 11, 2024 · 2 comments

Comments

@omlet05
Copy link

omlet05 commented Oct 11, 2024

What happened: We applied ip rule using nmstate yaml

What you expected to happen: ip rule doesn't remove them from the node, I had to use nmcli (nmcli connection modify vlan-xxx-dev -ipv4.routing-rules "priority x to x.x.x.x table x" in order to have them removed from nmstate & NetworkManager configuration

How to reproduce it (as minimally and precisely as possible): - deploy an ip rule, remove it from yaml. Check on the Linux with "ip rule" and you can notice that ip rule are back from old yaml.

Anything else we need to know?:
As there is no status for marking an ip rule as absent (e.g for route: For dropping a configured route, it must be marked as absent.)
What is the good procedure to remove them from the node?

nmcli connection modify vlan-xxx-dev -ipv4.routing-rules "priority x to x.x.x.x table x is working when table is not main but I didn't find the proper way to remove them from main table.

Environment:

  • NodeNetworkState on affected nodes (use kubectl get nodenetworkstate <node_name> -o yaml): n/a

  • Problematic NodeNetworkConfigurationPolicy:
    spec:
    desiredState:
    route-rules:
    config:
    - ip-to: x.x.x.x/32
    priority: 998
    route-table: 2

  • kubernetes-nmstate image (use kubectl get pods --all-namespaces -l app=kubernetes-nmstate -o jsonpath='{.items[0].spec.containers[0].image}'):
    registry.redhat.io/openshift4/ose-kubernetes-nmstate-handler-rhel9@sha256:94e410621cd8e516d3bbb6d2b9149724ec188268c0066360cc83af69adb20906

  • NetworkManager version (use nmcli --version): nmcli tool, version 1.42.2-21.el9_2

  • Kubernetes version (use kubectl version): Server Version: 4.14.33

  • OS (e.g. from /etc/os-release):

  • NAME="Red Hat Enterprise Linux CoreOS"
    Red Hat Enterprise Linux CoreOS 414.92.202407091253-0 (Plow)

  • Others:

@qinqon
Copy link
Member

qinqon commented Oct 16, 2024

To remove ip-rules you need to add state: absent to them.

@qinqon
Copy link
Member

qinqon commented Nov 18, 2024

@omlet05 is this resolved ?

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

2 participants