netsetgo
netsetgo copied to clipboard
netsetgo cannot recreate default route
If we run netsetgo into an existing container with a default route already set, the error below is returned:
ERROR - file exists
and exit code is 1. But if we remove the default route from inside the container, netsetgo runs without any message, returning 0 as exit code. The code in question calls netlink.RouteAdd: https://github.com/teddyking/netsetgo/blob/master/configurer/container.go#L47
In this case, should netsetgo recreate the default route, or just let it be without error if a default route already exists?
Thanks!
The intention for netsetgo is that it only gets run once when a container is first created, at which point there should be no default route, so I think it's ok to just let it error out if a route does already exist.
Fair enough, but I will try to add a more meaningful message :)
Ok, lets close this old bug :)