diff --git a/Pipfile.lock b/Pipfile.lock index 3683f7256..11d1b7628 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -365,11 +365,11 @@ }, "docker": { "hashes": [ - "sha256:13966471e8bc23b36bfb3a6fb4ab75043a5ef1dac86516274777576bed3b9828", - "sha256:bad94b8dd001a8a4af19ce4becc17f41b09f228173ffe6a4e0355389eef142f2" + "sha256:317e95a48c32de8c1aac92a48066a5b73e218ed096e03758bcdd799a7130a1a1", + "sha256:cffc771d4ea1389fc66bc95cb72d304aa41d1a1563482a9a000fba3a84ed5071" ], "index": "pypi", - "version": "==4.3.1" + "version": "==4.4.0" }, "drf-yasg2": { "hashes": [ diff --git a/passbook/outposts/controllers/docker.py b/passbook/outposts/controllers/docker.py index 6dbce6e87..3c3b21835 100644 --- a/passbook/outposts/controllers/docker.py +++ b/passbook/outposts/controllers/docker.py @@ -64,16 +64,19 @@ class DockerController(BaseController): image_prefix = CONFIG.y("outposts.docker_image_base") image_name = f"{image_prefix}-{self.outpost.type}:{__version__}" self.client.images.pull(image_name) + container_args = { + "image": image_name, + "name": f"passbook-proxy-{self.outpost.uuid.hex}", + "detach": True, + "ports": {x: x for _, x in self.deployment_ports.items()}, + "environment": self._get_env(), + "labels": self._get_labels(), + } + if settings.TEST: + del container_args["ports"] + container_args["network_mode"] = "host" return ( - self.client.containers.create( - image=image_name, - name=f"passbook-proxy-{self.outpost.uuid.hex}", - detach=True, - ports={x: x for _, x in self.deployment_ports.items()}, - environment=self._get_env(), - network_mode="host" if settings.TEST else "bridge", - labels=self._get_labels(), - ), + self.client.containers.create(**container_args), True, ) diff --git a/passbook/outposts/tasks.py b/passbook/outposts/tasks.py index dca2a748f..24fb5cab8 100644 --- a/passbook/outposts/tasks.py +++ b/passbook/outposts/tasks.py @@ -68,6 +68,10 @@ def outpost_controller(self: MonitoredTask, outpost_pk: str): logs = ProxyKubernetesController( outpost, service_connection ).up_with_logs() + LOGGER.debug("---------------Outpost Controller logs starting----------------") + for log in logs: + LOGGER.debug(log) + LOGGER.debug("-----------------Outpost Controller logs end-------------------") except ControllerException as exc: self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc)) else: