New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let the api to choose the default network driver. #17504
Conversation
@calavera that's interesting, then why wasn't it caught? |
@calavera needs rebase :D #thingsgotoofast |
953e0aa
to
acf5acf
Compare
Rebased, I removed the test because we have others that do the same. See: https://github.com/docker/docker/blob/master/integration-cli/docker_api_network_test.go#L26 @tiborvass because we have a check for empty in https://github.com/docker/docker/blob/master/daemon/network.go#L91 |
thanks @calavera. LGTM. I honestly don't remember why I made |
@mavenugo it's not that it's not required, it's a bug if it's there :) |
@tiborvass okay. i remember why I added it :) and it is not a bug. It was addressing this comment : #16645 (comment) |
having the right default in the help output makes sense. I don't know how we can check who set that value 😔 |
@calavera if we don't already, we could have an INFO log in the daemon logs to tell which driver was selected, better than nothing. |
acf5acf
to
3246757
Compare
Okay, I found how to solve this issue for real, yay for reading the docs! It turns out you can detect whether a user set a flag or not with @tiborvass, @mavenugo, @vieux please, take a look. |
These are the parameters we send to the api when I run
And this is what we send when I run
See that when I(the user) set the driver to Moreover,
|
even better thanks @lgtm |
@calavera nice, that's what we also do for |
That way swarm can understand the user's intention. Signed-off-by: David Calavera <david.calavera@gmail.com>
3246757
to
34668ad
Compare
LGTM |
dunno what windows ci is doing, merging |
Let the api to choose the default network driver.
That way swarm can understand the user's intention.
@tiborvass it turns out that we already have a bunch of tests in integration-cli/docker_api_network_test.go that already assume the driver is an empty string and let the daemon to select
bridge
as default network. I added an extra test here, but I don't think it's necessary.Closes #17500
Signed-off-by: David Calavera david.calavera@gmail.com