-
Notifications
You must be signed in to change notification settings - Fork 681
Take more care over HostConfig on start request in proxy #1534
Conversation
# Start c5 with a differently sneaky HostConfig | ||
proxy docker_on $HOST1 create --name=c5 $SMALL_IMAGE $CHECK_ETHWE_UP | ||
proxy docker_api_on $HOST1 POST /containers/c5/start '{"HostConfig": {"NetworkMode": "container:c1"}}' | ||
assert "docker_on $HOST1 inspect -f '{{.HostConfig.NetworkMode}} {{.State.Running}} {{.State.ExitCode}} {{.HostConfig.Dns}}' c5" "container:c1 false 0 [$docker_bridge_ip]" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
If the user sends both a top-level HostConfig, and a named sub-HostConfig, it looks like we only modify the inner one. Will that override the outer? Per f2f: it looks like it will, but should test cpuset handling. |
needs rebasing - the new |
Maybe add a test for cpuset handling, and the case where there are both HostConfigs, but other than that, LGTM. |
b5c5d11
to
c335d5e
Compare
I looked into However, this undesirable behaviour will happen for any valid JSON that Docker was previously ignoring, and we cannot detect all such requests. So I propose not to detect any of them. |
@@ -4,24 +4,38 @@ | |||
|
|||
start_suite "Abuse of 'start' operation" | |||
|
|||
weave_on $HOST1 launch | |||
weave_on $HOST1 launch --log-level=debug |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@bboreham needs rebase, apparently. |
16b3268
to
3c91860
Compare
Rebased and squashed into fewer commits |
and remove unused struct
…ker, also what happens when you supply a HostConfig named HostConfig
…l connecting to weave
bf099fb
to
526c9c3
Compare
Take more care over HostConfig on start request in proxy
"There are more things in heaven and earth,
HostConfig
, than are dreamt of in your philosophy"Fixes #1531 and #1532