Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[19.03 backport] Return "invalid parameter" when linking to non-existing container #352

Conversation

thaJeztah
Copy link
Member

backport of moby#39852 to fix the regression in 19.03

fixes moby#39823
fixes docker/for-mac#3871

Trying to link to a non-existing container is not valid, and should return an
"invalid parameter" (400) error. Returning a "not found" error in this situation
would make the client report the container's image could not be found.

Trying to link to a non-existing container is not valid, and should return an
"invalid parameter" (400) error. Returning a "not found" error in this situation
would make the client report the container's image could not be found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 422067b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 19.03.3 milestone Sep 10, 2019
@thaJeztah
Copy link
Member Author

Windows RS1 https://ci.docker.com/public/job/engine/job/PR-352/1/execution/node/169/log/?consoleFull

No idea on this one; it was flaky a few times in the past; https://github.com/moby/moby/search?q=TestAPIStatsNetworkStats&type=Issues.
We don't have bundles yet for Windows in this branch (need to backport moby#39858), so can't look deeper into that issue

00:46:52  FAIL: docker_api_stats_test.go:100: DockerSuite.TestAPIStatsNetworkStats
00:46:52  
00:46:52  assertion failed: error is not nil: exit status 1
00:46:52  
00:46:52  ----------------------------------------------------------------------

Other failure on RS1 is a known flaky issue moby#38521, and for which there's a WIP PR (that stalled unfortunately); moby#38595

01:41:00  FAIL: check_test.go:107: DockerSuite.TearDownTest
01:41:00  
01:41:00  assertion failed: error is not nil: Error response from daemon: container a3eb366e25660ac0998375a2d287a83c02369fa91df0a312e2fc481b1e567eb8: driver "windowsfilter" failed to remove root filesystem: hcsshim::GetComputeSystems: The requested compute system operation is not valid in the current state.: failed to remove a3eb366e25660ac0998375a2d287a83c02369fa91df0a312e2fc481b1e567eb8
01:41:00  
01:41:00  ----------------------------------------------------------------------
01:41:00  PANIC: docker_cli_start_test.go:190: DockerSuite.TestStartReturnCorrectExitCode
01:41:00  
01:41:00  docker_cli_start_test.go:200:
01:41:00      c.Assert(exitCode, checker.Equals, 12, check.Commentf("out: %s", out))
01:41:00  ... obtained int = 125
01:41:00  ... expected int = 12
01:41:00  ... out: time="2019-09-10T23:40:58Z" level=error msg="error waiting for container: EOF" 
01:41:00  
01:41:00  
01:41:00  ... Panic: Fixture has panicked (see related PANIC)

Copy link

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewhsu andrewhsu merged commit 2aa5322 into docker-archive:19.03 Sep 20, 2019
@thaJeztah thaJeztah deleted the 19.03_backport_detect_invalid_linked_container branch September 20, 2019 09:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants