fix: overlay connection with ipv4

This commit is contained in:
snsd0805 2024-06-02 15:16:44 +08:00
parent 3cae025242
commit 9759f99d29

View File

@ -76,7 +76,13 @@ class ClusterCommunicationModule():
# join docker swarm cluster
token = self.client_sock.recv(1024).decode().split(' ')[-1]
print("Receive Docker Swarm Join_Token=", token)
status = self.node_manager.docker_client.swarm.join(remote_addrs=[f'{addr[0]}:2377'], join_token=token, advertise_addr=f'{addr[0]}:2377')
status = self.node_manager.docker_client.swarm.join(
remote_addrs=[f'{addr[0]}:2377'],
join_token=token,
advertise_addr=self.host,
listen_addr=self.host,
data_path_addr=self.host,
)
if not status:
print("Some Errors!")