dff071c3b9
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. |
||
---|---|---|
.. | ||
cmd | ||
docklog | ||
test-resources/docker | ||
util | ||
config.go | ||
config_test.go | ||
coordinator.go | ||
coordinator_test.go | ||
driver.go | ||
driver_darwin_test.go | ||
driver_default.go | ||
driver_linux_test.go | ||
driver_pre09.go | ||
driver_test.go | ||
driver_unix_test.go | ||
driver_windows.go | ||
driver_windows_test.go | ||
fingerprint.go | ||
fingerprint_test.go | ||
handle.go | ||
network.go | ||
progress.go | ||
progress_test.go | ||
reconciler.go | ||
reconciler_test.go | ||
state.go | ||
stats.go | ||
stats_test.go | ||
utils.go | ||
utils_test.go | ||
utils_unix_test.go | ||
utils_windows_test.go | ||
win32_volume_parse.go |