canonical / charm-advanced-routing

This subordinate charm allows for the configuration of policy routing rules on the deployed host, as well as routes to configured services.
0 stars 3 forks source link

Getting RTNETLINK answers: File exists for rules #8

Closed jneo8 closed 9 months ago

jneo8 commented 9 months ago

The duplication check for rules is broken, it checks by grepping for all rule details but the rule list output has a different form

Example: with existing rule list

ip rule

... 101: from all to 1.1.1.1/25 lookup mytable ...

The duplicate rule check would do the equiv. of:

ip rule | grep "from all to 1.1.1.1/25 table mytable priority 101"

-- which doesn't match as the prio is elsewhere


Imported from Launchpad using lp2gh.