Try Fix Swarm connection
This commit is contained in:
parent
4d54fede5c
commit
3cc9547388
1 changed files with 3 additions and 3 deletions
|
|
@ -170,10 +170,10 @@ class Swarm(ProcessorInterface):
|
||||||
ip_address = endpoint["Addr"].split("/")[0]
|
ip_address = endpoint["Addr"].split("/")[0]
|
||||||
break
|
break
|
||||||
network_list.append(endpoint["NetworkID"])
|
network_list.append(endpoint["NetworkID"])
|
||||||
|
|
||||||
|
# add the network ha_proxy_network_id to the service object
|
||||||
if ip_address is None:
|
if ip_address is None:
|
||||||
network_list.append(ha_proxy_network_id)
|
self.client.networks.get(ha_proxy_network_id).connect(service.name)
|
||||||
service.update(networks = network_list)
|
|
||||||
continue # skip to the next service to give time to update the network
|
continue # skip to the next service to give time to update the network
|
||||||
|
|
||||||
self.parsed_object[ip_address] = service.attrs["Spec"]["Labels"]
|
self.parsed_object[ip_address] = service.attrs["Spec"]["Labels"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue