Skip to content

Commit

Permalink
Merge pull request #3937 from LiilyZhang/zhangl/Issue3931
Browse files Browse the repository at this point in the history
#3931 - Bug: e2edev failed since move to Docker 24.0.7
  • Loading branch information
LiilyZhang authored Nov 8, 2023
2 parents f2ba120 + 7ac61a1 commit d9b8f26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand All @@ -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" {
Expand Down

0 comments on commit d9b8f26

Please sign in to comment.