netplugin
netplugin copied to clipboard
netctl net create should raise an error is the gateway is not specified in routing mode.
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.
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.
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.
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.
if user does not specify should we by default use some address as default gateway in all modes ?
@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.
@rchirakk @DivyaVavili : any update here ?