Skip to content

Commit 14f3370

Browse files
kylos101nandajavarma
authored andcommitted
Sync interface name with docker-up and nsinsider
Context: gitpod-io/gitpod#16368 (comment)
1 parent 8a48e68 commit 14f3370

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

1108-
// override MTU value and set custom MTU one.
1109-
// This is required for gitpod.io due to the veth change
1110-
// https://github.com/gitpod-io/gitpod/pull/8955
1111-
if createOpts.Options == nil {
1112-
createOpts.Options = make(map[string]string)
1113-
}
1108+
// override MTU value and set custom MTU one.
1109+
// This is required for gitpod.io due to the veth change
1110+
// https://github.com/gitpod-io/gitpod/pull/8955
1111+
if createOpts.Options == nil {
1112+
createOpts.Options = make(map[string]string)
1113+
}
11141114

1115-
netIface, err := netlink.LinkByName("ceth0")
1116-
if err == nil {
1117-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1118-
}
1115+
netIface, err := netlink.LinkByName("eth0")
1116+
if err == nil {
1117+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1118+
}
11191119

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

0 commit comments

Comments
 (0)