Skip to content

Commit 8e1de02

Browse files
committed
Sync interface name with docker-up and nsinsider
Context: gitpod-io/gitpod#16368 (comment)
1 parent fd1ddbf commit 8e1de02

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/compose/create.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,17 +1280,17 @@ func (s *composeService) resolveOrCreateNetwork(ctx context.Context, n *types.Ne
12801280
createOpts.IPAM.Config = append(createOpts.IPAM.Config, config)
12811281
}
12821282

1283-
// override MTU value and set custom MTU one.
1284-
// This is required for gitpod.io due to the veth change
1285-
// https://github.com/gitpod-io/gitpod/pull/8955
1286-
if createOpts.Options == nil {
1287-
createOpts.Options = make(map[string]string)
1288-
}
1283+
// override MTU value and set custom MTU one.
1284+
// This is required for gitpod.io due to the veth change
1285+
// https://github.com/gitpod-io/gitpod/pull/8955
1286+
if createOpts.Options == nil {
1287+
createOpts.Options = make(map[string]string)
1288+
}
12891289

1290-
netIface, err := netlink.LinkByName("ceth0")
1291-
if err == nil {
1292-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1293-
}
1290+
netIface, err := netlink.LinkByName("eth0")
1291+
if err == nil {
1292+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1293+
}
12941294

12951295
networkEventName := fmt.Sprintf("Network %s", n.Name)
12961296
w := progress.ContextWriter(ctx)

0 commit comments

Comments
 (0)