Skip to content

Conversation

lowenna
Copy link
Contributor

@lowenna lowenna commented Jul 23, 2015

Signed-off-by: John Howard jhoward@microsoft.com

@swernli @cpuguy83

This PR relates to moby/moby#10662 which is for the docker daemon port to Windows. Part of the daemon port requires the checking of the network mode setting to be moved from the CLI to the daemon, as network modes are platform specific. That PR in docker is moby/moby#14530.

However, for CI on docker-py to pass in docker, it requires updates to docker-py to pass the netmode (which the docker CLI itself would normally do - just the tests here are generally written with the smallest amount of config settings necessary for validation).

Hence this PR adds the network mode where required to the tests. After this is merged, I can update the Dockerfile in 14530 to point to the right docker-py commit.

Validation performed: I have validated docker-py with these changes passes "make binary test-docker-py" against docker/docker master as of this morning. I have also validated that docker-py running against docker with the 14530 changes passes Jenkins CI in docker.

@lowenna
Copy link
Contributor Author

lowenna commented Jul 27, 2015

@shin- @mpetazzoni @aanand - Guys, any chance of getting a review on this? It's needed as a pre-req for a docker PR which we need for the Windows daemon to support the upcoming TP3 docker release. Thanks :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be default instead to maintain backwards compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looked at v1.6.0 docker\docker runconfig\parse.go, func parseNetMode L445. (Sorry, can't work out how to get a link directly to a previous version). The valid cases are bridge, none, host and container. Looks like default didn't arrive until later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But since the pre-condition here is that API version is >= 1.20, Docker 1.6 shouldn't be a concern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using none is (IMO) cleaner as it pulls in "less" for the test on the daemon side (bearing in mind networking isn't needed for these tests).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but that's the default value you're assigning not just for the tests but every other project using docker-py. It should be default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I should have used none in the others lol. I'll update :)

@shin-
Copy link
Contributor

shin- commented Jul 27, 2015

Can you address those few comments? Thanks!

@lowenna lowenna force-pushed the 14530-netmode branch 5 times, most recently from 72f4485 to e211e45 Compare July 28, 2015 21:46
Signed-off-by: John Howard <jhoward@microsoft.com>
@lowenna
Copy link
Contributor Author

lowenna commented Jul 28, 2015

@shin- I have it passing again, but I'm not sure how to address the remainder of your comments. (Python is new to me entirely).

@shin-
Copy link
Contributor

shin- commented Jul 28, 2015

Thanks, that's helpful - I'll take it from here.

@icecrime
Copy link

icecrime commented Aug 6, 2015

Ping @shin-: can we move this forward please?

@shin-
Copy link
Contributor

shin- commented Aug 6, 2015

See #698

@shin- shin- closed this Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants