Skip to content

Don't fail to start daemon if builder source is not available#37280

Merged
tonistiigi merged 1 commit intomoby:masterfrom
microsoft:jjh/fixbuildersources
Jun 14, 2018
Merged

Don't fail to start daemon if builder source is not available#37280
tonistiigi merged 1 commit intomoby:masterfrom
microsoft:jjh/fixbuildersources

Conversation

@lowenna
Copy link
Member

@lowenna lowenna commented Jun 13, 2018

Signed-off-by: John Howard [email protected]

Fixes #37278. Following the merge of #37151 (comment), the daemon no longer starts if git is not in the path.

Temporary solution (not sure if correct, but at least to get master running again) is to only register the source if it initialises, and warn if failed.

@tonistiigi @tiborvass @johnstep @thaJeztah PTAL

@tianon @jstarks FYI

Before

PS C:\> dockerd
INFO[2018-06-13T09:04:23.208583500-07:00] Windows default isolation mode: process
INFO[2018-06-13T09:04:23.294671100-07:00] Loading containers: start.
INFO[2018-06-13T09:04:23.298646300-07:00] Restoring existing overlay networks from HNS into docker
INFO[2018-06-13T09:04:23.399254200-07:00] Loading containers: done.
INFO[2018-06-13T09:04:23.402261600-07:00] Docker daemon                                 commit=692df4699c graphdriver(s)=windowsfilter version=0.0.0-dev
INFO[2018-06-13T09:04:23.405258500-07:00] Daemon has completed initialization
failed to find git binary: exec: "git": executable file not found in %PATH%
PS C:\>

After

PS C:\> dockerd
INFO[2018-06-13T09:32:09.243682200-07:00] Windows default isolation mode: process
INFO[2018-06-13T09:32:09.287684200-07:00] Loading containers: start.
INFO[2018-06-13T09:32:09.290706100-07:00] Restoring existing overlay networks from HNS into docker
INFO[2018-06-13T09:32:09.398698500-07:00] Loading containers: done.
INFO[2018-06-13T09:32:09.401675600-07:00] Docker daemon                                 commit=692df4699c-unsupported graphdriver(s)=windowsfilter version=0.0.0-dev
INFO[2018-06-13T09:32:09.404660000-07:00] Daemon has completed initialization
INFO[2018-06-13T09:32:09.448672000-07:00] API listen on //./pipe/docker_engine

Copy link
Contributor

@tiborvass tiborvass left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@seemethere seemethere left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@johnstep johnstep left a comment

Choose a reason for hiding this comment

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

LGTM as a temporary workaround, though only the git source creation can fail, so it might be best to leave creation of the others unchanged for now.

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

SGTM 👼

@lowenna
Copy link
Member Author

lowenna commented Jun 13, 2018

Failures look benign. Are these current known CI errors?

Z

01:11:13.963 ----------------------------------------------------------------------
01:11:13.963 FAIL: docker_api_swarm_test.go:296: DockerSwarmSuite.TestAPISwarmLeaderElection
01:11:13.963 
01:11:13.963 [d3de8d7afd6fd] waiting for daemon to start
01:11:13.963 [d3de8d7afd6fd] daemon started
01:11:13.963 
01:11:13.963 [da14b35947d89] waiting for daemon to start
01:11:13.963 [da14b35947d89] daemon started
01:11:13.963 
01:11:13.963 [defc54a69eb27] waiting for daemon to start
01:11:13.963 [defc54a69eb27] daemon started
01:11:13.963 
01:11:13.963 [d3de8d7afd6fd] exiting daemon
01:11:13.963 assertion failed: error is not nil: Error response from daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded
01:11:13.964 [da14b35947d89] exiting daemon
01:11:13.964 [defc54a69eb27] exiting daemon
01:11:38.358 
01:11:38.358 ----------------------------------------------------------------------

PPC

01:24:19.026 ----------------------------------------------------------------------
01:24:19.026 FAIL: docker_cli_daemon_test.go:1800: DockerDaemonSuite.TestDaemonNoSpaceLeftOnDeviceError
01:24:19.027 
01:24:19.027 [d012a29f201f1] waiting for daemon to start
01:24:19.027 [d012a29f201f1] exiting daemon
01:24:19.027 docker_cli_daemon_test.go:1817:
01:24:19.027     s.d.Start(c, "--data-root", filepath.Join(testDir, "test-mount"))
01:24:19.027 /go/src/github.com/docker/docker/internal/test/daemon/daemon.go:203:
01:24:19.027     t.Fatalf("Error starting daemon with arguments: %v", args)
01:24:19.027 ... Error: Error starting daemon with arguments: [--data-root /tmp/no-space-left-on-device-test031689924/test-mount]
01:24:19.027 
01:24:21.193 
01:24:21.193 ----------------------------------------------------------------------

Janky

01:24:36.950 ----------------------------------------------------------------------
01:24:36.950 FAIL: docker_api_swarm_service_test.go:33: DockerSwarmSuite.TestAPIServiceUpdatePort
01:24:36.950 
01:24:36.950 [d7b202dbbd72b] waiting for daemon to start
01:24:36.950 [d7b202dbbd72b] daemon started
01:24:36.950 
01:24:36.950 docker_api_swarm_service_test.go:39:
01:24:36.950     waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, 1)
01:24:36.950 docker_utils_test.go:435:
01:24:36.950     c.Assert(v, checker, args...)
01:24:36.950 ... obtained int = 0
01:24:36.950 ... expected int = 1
01:24:36.950 
01:24:36.950 [d7b202dbbd72b] exiting daemon
01:24:48.991 
01:24:48.991 ----------------------------------------------------------------------

@andrewhsu
Copy link
Contributor

the z and powerpc errors are known flakey, janky kicked again

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Wonder if we should add a warning to the docker info output so that it's more clear that it's not supported (not for this PR)

@thaJeztah
Copy link
Member

thanks @jhowardmsft!

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