Skip to content

Commit 3a77d58

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

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
@@ -1169,17 +1169,17 @@ func (s *composeService) resolveOrCreateNetwork(ctx context.Context, n *types.Ne
11691169
createOpts.IPAM.Config = append(createOpts.IPAM.Config, config)
11701170
}
11711171

1172-
// override MTU value and set custom MTU one.
1173-
// This is required for gitpod.io due to the veth change
1174-
// https://github.com/gitpod-io/gitpod/pull/8955
1175-
if createOpts.Options == nil {
1176-
createOpts.Options = make(map[string]string)
1177-
}
1172+
// override MTU value and set custom MTU one.
1173+
// This is required for gitpod.io due to the veth change
1174+
// https://github.com/gitpod-io/gitpod/pull/8955
1175+
if createOpts.Options == nil {
1176+
createOpts.Options = make(map[string]string)
1177+
}
11781178

1179-
netIface, err := netlink.LinkByName("ceth0")
1180-
if err == nil {
1181-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1182-
}
1179+
netIface, err := netlink.LinkByName("eth0")
1180+
if err == nil {
1181+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1182+
}
11831183

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

0 commit comments

Comments
 (0)