fixed the way docker containers are terminated

This commit is contained in:
Goran Cetusic authored and Julien Duponchelle committed 2015-09-08 10:54:27 +02:00
1 parent 0ab95ae043
commit 9ee1d9d71a
3 files changed
+8 -2

No files matched your search

+2 -1
View File
@@ -25,6 +25,7 @@ import shutil
import asyncio
import subprocess
import logging
import aiohttp
import docker
log = logging.getLogger(__name__)
@@ -126,7 +127,7 @@ class Docker(BaseManager):
if cid not in self._vms:
raise aiohttp.web.HTTPNotFound(
text="Docker container with ID {} doesn't exist".format(vm_id))
text="Docker container with ID {} doesn't exist".format(cid))
container = self._vms[cid]
if project_id:
+1 -1
View File
@@ -128,7 +128,7 @@ class Container(BaseVM):
def stop(self):
"""Stops this Docker container."""
result = yield from self.manager.execute(
"stop", {"container": self._id})
"kill", {"container": self._id})
log.info("Docker container '{name}' [{image}] stopped".format(
name=self._name, image=self._image))