Skip to content

Commit eb22046

Browse files
kylos101WVerlaek
authored andcommitted
Sync interface name with docker-up and nsinsider
Context: gitpod-io/gitpod#16368 (comment)
1 parent 9046ba6 commit eb22046

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

1180-
// override MTU value and set custom MTU one.
1181-
// This is required for gitpod.io due to the veth change
1182-
// https://github.com/gitpod-io/gitpod/pull/8955
1183-
if createOpts.Options == nil {
1184-
createOpts.Options = make(map[string]string)
1185-
}
1180+
// override MTU value and set custom MTU one.
1181+
// This is required for gitpod.io due to the veth change
1182+
// https://github.com/gitpod-io/gitpod/pull/8955
1183+
if createOpts.Options == nil {
1184+
createOpts.Options = make(map[string]string)
1185+
}
11861186

1187-
netIface, err := netlink.LinkByName("ceth0")
1188-
if err == nil {
1189-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1190-
}
1187+
netIface, err := netlink.LinkByName("eth0")
1188+
if err == nil {
1189+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1190+
}
11911191

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

0 commit comments

Comments
 (0)