build(deps): bump docker from 4.3.1 to 4.4.0 (#344)

* build(deps): bump docker from 4.3.1 to 4.4.0

Bumps [docker](https://github.com/docker/docker-py) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/docker/docker-py/releases)
- [Commits](https://github.com/docker/docker-py/compare/4.3.1...4.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

* outposts: fix both network_mode and ports being set during tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens L <jens@beryju.org>
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
dependabot[bot] 2020-11-26 11:25:06 +01:00 committed by GitHub
parent 2449c63d0a
commit 04f876af7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 12 deletions

6
Pipfile.lock generated
View File

@ -365,11 +365,11 @@
}, },
"docker": { "docker": {
"hashes": [ "hashes": [
"sha256:13966471e8bc23b36bfb3a6fb4ab75043a5ef1dac86516274777576bed3b9828", "sha256:317e95a48c32de8c1aac92a48066a5b73e218ed096e03758bcdd799a7130a1a1",
"sha256:bad94b8dd001a8a4af19ce4becc17f41b09f228173ffe6a4e0355389eef142f2" "sha256:cffc771d4ea1389fc66bc95cb72d304aa41d1a1563482a9a000fba3a84ed5071"
], ],
"index": "pypi", "index": "pypi",
"version": "==4.3.1" "version": "==4.4.0"
}, },
"drf-yasg2": { "drf-yasg2": {
"hashes": [ "hashes": [

View File

@ -64,16 +64,19 @@ class DockerController(BaseController):
image_prefix = CONFIG.y("outposts.docker_image_base") image_prefix = CONFIG.y("outposts.docker_image_base")
image_name = f"{image_prefix}-{self.outpost.type}:{__version__}" image_name = f"{image_prefix}-{self.outpost.type}:{__version__}"
self.client.images.pull(image_name) 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 ( return (
self.client.containers.create( self.client.containers.create(**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(),
network_mode="host" if settings.TEST else "bridge",
labels=self._get_labels(),
),
True, True,
) )

View File

@ -68,6 +68,10 @@ def outpost_controller(self: MonitoredTask, outpost_pk: str):
logs = ProxyKubernetesController( logs = ProxyKubernetesController(
outpost, service_connection outpost, service_connection
).up_with_logs() ).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: except ControllerException as exc:
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc)) self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
else: else: