nmstate / kubernetes-nmstate

Declarative node network configuration driven through Kubernetes API.
GNU General Public License v2.0
188 stars 90 forks source link

ip rules, gitops cleanup? #1270

Open omlet05 opened 1 month ago

omlet05 commented 1 month ago

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:

qinqon commented 1 month ago

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

qinqon commented 3 days ago

@omlet05 is this resolved ?