yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #10762
[Bug 1242815] Re: docker virt driver does not stop containers if spawn fails to setup network
** Changed in: nova
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1242815
Title:
docker virt driver does not stop containers if spawn fails to setup
network
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Using docker virt driver (i.e. compute_driver = docker.DockerDriver in
/etc/nova/nova.conf) -- if nova.virt.docker.driver.spawn() fails in
setup_network(), the started container is not stopped prior to the
driver reporting error.
A snippet from docker virt driver's spawn() method:
self.docker.start_container(container_id)
try:
self._setup_network(instance, network_info)
except Exception as e:
msg = _('Cannot setup network: {0}')
raise exception.InstanceDeployFailure(msg.format(e),
instance_id=instance['name'])
As shown above, the docker container is started and then networking is attempted -- if the _setup_network() call fails, and exception is raised but the docker container is left running... I had this happen to me and after the _setup_network() error I issued a "docker ps" command -- my container was still running until I stopped it manually with "docker stop CID".
The result of the above is container sprawl.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1242815/+subscriptions