Skip to content

Commit aaab740

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

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

1134-
// override MTU value and set custom MTU one.
1135-
// This is required for gitpod.io due to the veth change
1136-
// https://github.com/gitpod-io/gitpod/pull/8955
1137-
if createOpts.Options == nil {
1138-
createOpts.Options = make(map[string]string)
1139-
}
1134+
// override MTU value and set custom MTU one.
1135+
// This is required for gitpod.io due to the veth change
1136+
// https://github.com/gitpod-io/gitpod/pull/8955
1137+
if createOpts.Options == nil {
1138+
createOpts.Options = make(map[string]string)
1139+
}
11401140

1141-
netIface, err := netlink.LinkByName("ceth0")
1142-
if err == nil {
1143-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1144-
}
1141+
netIface, err := netlink.LinkByName("eth0")
1142+
if err == nil {
1143+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1144+
}
11451145

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

0 commit comments

Comments
 (0)