Skip to content

Conversation

@lowenna
Copy link
Member

@lowenna lowenna commented Jul 10, 2015

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

@swernli

This PR is part of the proposal described in docker/docker issue 10662 to port the docker daemon to Windows. This PR moves the validation of --netmode to the daemon. As the CLI could be pointing to multiple platforms which support different netmodes, it's impossible for the CLI to be deterministic and validate the supplied value.

Fixes #14615

@lowenna lowenna changed the title Move netmode validation to server Windows: Move netmode validation to server Jul 10, 2015
@lowenna lowenna force-pushed the 10662-serversidevalidation branch from fc52126 to b690152 Compare July 10, 2015 19:20
@lowenna
Copy link
Member Author

lowenna commented Jul 10, 2015

I'm sure someone will ask why I changed container_config_1_14.json. I went back to Docker v1.2.0 which is API version 1.14. Docker 1.2 has netmode present in HostConfig, but it wasn't present in the fixture. A an empty networkmode is not valid and it's validated in runconfig rather than the client, the tests on runconfig would otherwise fail.

@lowenna lowenna force-pushed the 10662-serversidevalidation branch 3 times, most recently from 99b67ec to 46e28d4 Compare July 10, 2015 21:42
@lowenna lowenna force-pushed the 10662-serversidevalidation branch from 46e28d4 to 632b8bb Compare July 12, 2015 01:28
@lowenna lowenna force-pushed the 10662-serversidevalidation branch 3 times, most recently from 7978e40 to 59fa7ce Compare July 14, 2015 16:35
@lowenna
Copy link
Member Author

lowenna commented Jul 14, 2015

Added tests to integration-cli (reworked from runconfig); rebased; waiting for Jenkins

@cpuguy83
Copy link
Member

A few failures.

@lowenna lowenna force-pushed the 10662-serversidevalidation branch from 59fa7ce to 2c1da0b Compare July 14, 2015 21:55
@lowenna
Copy link
Member Author

lowenna commented Jul 14, 2015

@cpuguy83 - yes, there were a few lazily written tests with incomplete hostconfigs. And a further fix I had to put into runconfig. All the tests should (famous last words) run successfully now. Worked locally.

@lowenna lowenna closed this Jul 14, 2015
@lowenna lowenna reopened this Jul 14, 2015
@lowenna
Copy link
Member Author

lowenna commented Jul 14, 2015

Now needs an update to docker-py to fix missing netmode in their integration tests....

@lowenna lowenna force-pushed the 10662-serversidevalidation branch from 2c1da0b to 877b176 Compare July 15, 2015 20:36
@lowenna
Copy link
Member Author

lowenna commented Jul 15, 2015

This should pass Jenkins. But do not merge in it's current form - it has a hack in Dockerfile to pull docker-py from a GitHub branch which has a change which has not yet been PR'd to docker-py. (Will revert this change once Jenkins validates the fix).

Strike that - looks like after not having updated docker-py in docker CI for some 6 months, there are some unrelated things which have broken. Investigating....

@lowenna lowenna force-pushed the 10662-serversidevalidation branch 4 times, most recently from 0fea7da to 3897966 Compare July 15, 2015 23:37
@lowenna lowenna force-pushed the 10662-serversidevalidation branch from cfdd928 to 6e5422c Compare August 13, 2015 21:32
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand this change. Can you please help understand what this is about ?
the "default" implicit mode is introduced recently. The default used to be "bridge".
I assume this is required for backward compatibility check. But isnt it true that the current code should work without the need for this particular change ?

Copy link
Member Author

Choose a reason for hiding this comment

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

You may be right now with the latest updates. Let me check.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you're right. Reverting.

@lowenna lowenna force-pushed the 10662-serversidevalidation branch 3 times, most recently from 727bdc3 to 6af5cf5 Compare August 14, 2015 01:05
@lowenna
Copy link
Member Author

lowenna commented Aug 14, 2015

@mavenugo Updated. Can you verify that my update for your last comment is correct. Running integration-cli locally, and now waiting on Jenkins.

@mavenugo
Copy link
Contributor

@jhowardmsft Thanks for addressing all the comments. 👍

LGTM.

@lowenna
Copy link
Member Author

lowenna commented Aug 14, 2015

Thank you so much, @mavenugo!

Copy link
Contributor

Choose a reason for hiding this comment

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

@jhowardmsft curious to know why you need to bump docker py commit?

Copy link
Contributor

Choose a reason for hiding this comment

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

To answer myself: #14530 (comment)

@tiborvass
Copy link
Contributor

The tests fail when I run them in windows against a linux daemon:
https://gist.github.com/tiborvass/48d3fc39b7519b1bd9b3

Signed-off-by: John Howard <jhoward@microsoft.com>
@lowenna lowenna force-pushed the 10662-serversidevalidation branch from 6af5cf5 to f6ed590 Compare August 14, 2015 19:17
@lowenna
Copy link
Member Author

lowenna commented Aug 14, 2015

@tiborvass Verified tests work locally Windows to Linux. Waiting for Jenkins. https://gist.github.com/jhowardmsft/50ba1d79f10b1fb81447

@tiborvass
Copy link
Contributor

LGTM

@lowenna
Copy link
Member Author

lowenna commented Aug 14, 2015

I've never been so happy to see status/4-merge on a PR so far!!!!! Thank you all for the reviews and comments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants