You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add additional routes to an existing interface using community.general.nmcli the routes are added to the connection profile but not made active on the machine.
I can see by running nmcli show connection <foo> | grep ipv4.routes: that the routes are updated in the connection configuration but not made active. If I run ip route show the routes from the nmcli profile are not in the system's routing table.
felixfontein
changed the title
Changing routes on an interface does not lead to active routes on a host
nmcli: changing routes on an interface does not lead to active routes on a host
Aug 5, 2024
Summary
When I add additional routes to an existing interface using community.general.nmcli the routes are added to the connection profile but not made active on the machine.
I can see by running
nmcli show connection <foo> | grep ipv4.routes:
that the routes are updated in the connection configuration but not made active. If I runip route show
the routes from the nmcli profile are not in the system's routing table.This seems to be due to
https://github.com/ansible-collections/community.general/blob/main/plugins/modules/nmcli.py#L2629-L2652
where the module only runs
modify
when the interface already exists. For a new interface the interface is brought up which makes the routes active.I've worked around this by writing a handler I can call to run
nmcli connection up <foo>
when changes happen.Issue Type
Bug Report
Component Name
community.general.nmcli
Ansible Version
Community.general Version
Configuration
OS / Environment
Rocky 9
Steps to Reproduce
the register and notify are so I can
nmcli up
the connection to make the routes activeExpected Results
I expect
ip route show
to contain the routes that are also innmcli connection show <foo> | grep 'ipv4.routes:'
Actual Results
routes are in the NetworkManager connection profile but not the system's routing table.
Code of Conduct
The text was updated successfully, but these errors were encountered: