outposts: fix error when comparing ports in docker controller when port mapping is disabled
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
bcf7e162a4
commit
1ac4dacc3b
|
@ -76,6 +76,9 @@ class DockerController(BaseController):
|
||||||
# {'HostIp': '0.0.0.0', 'HostPort': '389'},
|
# {'HostIp': '0.0.0.0', 'HostPort': '389'},
|
||||||
# {'HostIp': '::', 'HostPort': '389'}
|
# {'HostIp': '::', 'HostPort': '389'}
|
||||||
# ]}
|
# ]}
|
||||||
|
# If no ports are mapped (either mapping disabled, or host network)
|
||||||
|
if not container.ports:
|
||||||
|
return False
|
||||||
for port in self.deployment_ports:
|
for port in self.deployment_ports:
|
||||||
key = f"{port.inner_port or port.port}/{port.protocol.lower()}"
|
key = f"{port.inner_port or port.port}/{port.protocol.lower()}"
|
||||||
if key not in container.ports:
|
if key not in container.ports:
|
||||||
|
|
Reference in New Issue