open-nomad/drivers
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
..
docker driver/docker: protect against nil container 2020-04-19 15:34:45 -04:00
exec client: support no_pivot_root in exec driver configuration 2020-02-18 09:27:16 -08:00
java drivers: always initialize taskHandle.logger 2019-11-22 10:44:59 -05:00
mock ar: initial driver based network management 2019-07-31 01:03:17 -04:00
qemu drivers: always initialize taskHandle.logger 2019-11-22 10:44:59 -05:00
rawexec changelog and comment 2019-11-19 15:51:08 -05:00
shared update grpc 2020-03-03 08:39:54 -05:00