netplugin icon indicating copy to clipboard operation
netplugin copied to clipboard

netctl net create should raise an error is the gateway is not specified in routing mode.

Open neelimamukiri opened this issue 8 years ago • 6 comments

Creating a network without a gateway specified, while in routing mode is pretty much useless and confusing to users as to why it does not work. It is simpler if we just throw an error at the network creation time.

neelimamukiri avatar May 01 '17 17:05 neelimamukiri

while in routing mode is pretty much useless and confusing to users gateway is required only for routing Isn't a proper document enough for this ? another approach would be to allocate a gateway when user has not specified one.

rchirakk avatar May 02 '17 16:05 rchirakk

In docker (swarm) environment if you don’t specify a gateway, docker creates a gateway and uses docker bridge to route the traffic out. So we should continue to have an option to allow creation of network without a gateway. In routing mode, this would mean that we can only reach containers in the same network and not across networks. This is the same behavior as docker networks (no routing across) and there might be use-cases for that.Can we update the documentation instead of failing the command.

rchirakk avatar May 02 '17 21:05 rchirakk

We could add a troubleshooting section in our document to debug issues like this. But specifying a gateway is not mandatory in all use-cases.

dvavili avatar May 02 '17 21:05 dvavili

if user does not specify should we by default use some address as default gateway in all modes ?

gaurav-dalvi avatar May 03 '17 00:05 gaurav-dalvi

@rchirakk, "In docker (swarm) environment if you don’t specify a gateway, docker creates a gateway and uses docker bridge to route the traffic out.", can we then do this for kubernetes as well? Updating docs and adding troubleshooting are fine, but users usually try out and only start debugging when things dont work. It is a waste of time and frustrating and if we can prevent it by having sane defaults or useful error messages, that is better. The more pre-reqs we add to get to a working setup, the higher is the barrier to entry to use Contiv. Pretty much every user who has tried this on k8s, since we switched to routing has been bitten by this issue.

neelimamukiri avatar May 03 '17 16:05 neelimamukiri

@rchirakk @DivyaVavili : any update here ?

gaurav-dalvi avatar May 09 '17 19:05 gaurav-dalvi