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
I'm trying to use this module to configure my network routes. I'm running ubuntu servers (12.04, 14.04 and 16.04). My problem is that although network_route is creating entries in /etc/network/routes the route is not actually added in the system after a restart or manually add.
To solve this, I have add an exec to run /etc/init.d/networking restart but this doesn't work in all ubuntu servers (networking configuration changed since 14.04).
I have also tried to use the /etc/init.d/networking-routes script provided with ifupdown-extra package. The problem in this case is that network_route is adding blank spaces (I guess that spaces for options) at the end of every line so that script didn't parse them.
Would it be possible that network_route implements the actual command to add/remove the route in a running system?
The text was updated successfully, but these errors were encountered:
It puts extra spaces that make the file unparsable by ifupdown-extra? that sounds bad, can you post an example manifest and resulting networking-routes script?
With this manifest, you can see the route file produced in this gist, where you can see spaces at the end of line 6.
The problem is that in some ubuntu distributions (I have checked it in 12.04 and 14.04) the /etc/init.d/networking-routes provided with ifupdown-extra package to reload routes has this line:
...
add_global_routes() {
ret=0
cat $ROUTEFILE | egrep "^[^#].*any$" |
while read network netmask gateway interface ; do
...
and because of the final espaces the routes are ignored.
The route file created is valid for the ifupdown script run in the system boot (when the interface is initialized). The problem is with the script provided to reload routes without shutting down interfaces.
I have also checked that the script provided with the package for ubuntu 16.04 uses a different grep, so the file produced is compatible.
Hi,
I'm trying to use this module to configure my network routes. I'm running ubuntu servers (12.04, 14.04 and 16.04). My problem is that although
network_route
is creating entries in/etc/network/routes
the route is not actually added in the system after a restart or manually add.To solve this, I have add an exec to run
/etc/init.d/networking restart
but this doesn't work in all ubuntu servers (networking configuration changed since 14.04).I have also tried to use the
/etc/init.d/networking-routes
script provided withifupdown-extra
package. The problem in this case is thatnetwork_route
is adding blank spaces (I guess that spaces for options) at the end of every line so that script didn't parse them.Would it be possible that
network_route
implements the actual command to add/remove the route in a running system?The text was updated successfully, but these errors were encountered: