open-nomad/drivers/docker
Mahmood Ali dff071c3b9 driver/docker: protect against nil container
Protect against a panic when we attempt to start a container with a name
that conflicts with an existing one.  If the existing one is being
deleted while nomad first attempts to create the container, the
createContainer will fail with `container already exists`, but we get
nil container reference from the `containerByName` lookup, and cause a
crash.

I'm not certain how we get into the state, except for being very
unlucky.  I suspect that this case may be the result of a concurrent
restart or the docker engine API not being fully consistent (e.g. an
earlier call purged the container, but docker didn't free up resources
yet to create a new container with the same name immediately yet).

If that's the case, then re-attempting creation will hopefully succeed,
or we'd at least fail enough times for the alloc to be rescheduled to
another node.
2020-04-19 15:34:45 -04:00
..
cmd Plugins use parent loggers 2019-01-11 11:36:37 -08:00
docklog update grpc 2020-03-03 08:39:54 -05:00
test-resources/docker Parse security_opts before sending them to docker daemon 2020-03-31 08:34:41 -07:00
util docker: Support stats on Windows 2019-02-22 14:19:58 +01:00
config.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
config_test.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
coordinator.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
coordinator_test.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
driver.go driver/docker: protect against nil container 2020-04-19 15:34:45 -04:00
driver_darwin_test.go tests: run docker tests in macOS out of box 2019-01-08 14:35:40 -05:00
driver_default.go docker: v19.03.8 2020-03-28 17:29:04 +01:00
driver_linux_test.go tests: attempt to deflake TestDockerDriver_PidsLimit 2020-03-30 07:06:52 -04:00
driver_pre09.go client: fix bug during 0.8 state up grade that causes external drivers to fail 2019-01-30 14:22:29 -05:00
driver_test.go Parse security_opts before sending them to docker daemon 2020-03-31 08:34:41 -07:00
driver_unix_test.go tests: swap lib/freeport for tweaked helper/freeport 2019-12-09 08:37:32 -06:00
driver_windows.go driver/docker: use default network mode 2019-07-31 21:07:46 +03:00
driver_windows_test.go chore: General Cleanup 2019-01-17 18:43:14 +01:00
fingerprint.go Update drivers/docker/fingerprint.go 2020-03-30 22:11:42 +02:00
fingerprint_test.go docker: report unhealthy in unsupported Windows (#5356) 2019-02-27 08:10:23 -05:00
handle.go driver: allow disabling log collection 2019-12-08 14:15:03 -05:00
network.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
progress.go Making pull activity timeout configurable in Docker 2019-12-18 12:58:53 +01:00
progress_test.go docker: started work on porting docker driver to new plugin framework 2018-11-19 22:59:15 -05:00
reconciler.go add timeouts for docker reconciler docker calls 2019-10-18 15:31:13 -04:00
reconciler_test.go tests: swap lib/freeport for tweaked helper/freeport 2019-12-09 08:37:32 -06:00
state.go docker: started work on porting docker driver to new plugin framework 2018-11-19 22:59:15 -05:00
stats.go docker: improve stats names and comments 2019-04-02 09:18:38 -07:00
stats_test.go docker: improve stats names and comments 2019-04-02 09:18:38 -07:00
utils.go Resolve docker types conflict 2020-03-28 17:29:06 +01:00
utils_test.go driver/docker: Support `volumes` field in Windows 2019-04-25 09:02:44 -04:00
utils_unix_test.go Remove argument passing runtime GOOS 2020-03-03 15:39:43 +01:00
utils_windows_test.go Avoid resolving dotted segments when host path for volume is named pipe 2020-03-03 14:00:19 +01:00
win32_volume_parse.go driver/docker: support unix destination mount path in windows 2019-08-01 19:54:08 +03:00