From 7ac61a167f37c68a5bc4c1bc29df085b05db27f9 Mon Sep 17 00:00:00 2001 From: zhangl Date: Wed, 8 Nov 2023 16:07:01 +0000 Subject: [PATCH] open-horizon#3931 - Bug: e2edev failed since move to Docker 24.0.7 Signed-off-by: zhangl --- container/container.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/container/container.go b/container/container.go index 3c2ea426a..824d99a66 100644 --- a/container/container.go +++ b/container/container.go @@ -1436,7 +1436,7 @@ func (b *ContainerWorker) ResourcesCreate(agreementId string, agreementProtocol if existingContainer == nil { // only create container if there wasn't one - servicePair.serviceConfig.HostConfig.NetworkMode = bridgeName + servicePair.serviceConfig.HostConfig.NetworkMode = "bridge" if err := serviceStart(b.client, agreementId, containerName, shareLabel, servicePair.serviceConfig, eps, ms_sharedendpoints, &postCreateContainers, fail, true); err != nil { return nil, err } @@ -1456,6 +1456,7 @@ func (b *ContainerWorker) ResourcesCreate(agreementId string, agreementProtocol return nil, err } else { for _, net := range networks { + // custom network has agreementId as bridge(network) name, same as endpoint key if isAnaxNetwork(&net, agreementId) { glog.V(5).Infof("Found network %v already present", net.Name) agBridge = &net @@ -1481,7 +1482,7 @@ func (b *ContainerWorker) ResourcesCreate(agreementId string, agreementProtocol // every one of these gets wired to both the agBridge and every shared bridge from this agreement for serviceName, servicePair := range private { if servicePair.serviceConfig.HostConfig.NetworkMode == "" { - servicePair.serviceConfig.HostConfig.NetworkMode = agreementId // custom bridge has agreementId as name, same as endpoint key + servicePair.serviceConfig.HostConfig.NetworkMode = "bridge" } var endpoints map[string]*docker.EndpointConfig if servicePair.serviceConfig.HostConfig.NetworkMode != "host" {