Skip to content

Commit 634a01c

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

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

1202-
// override MTU value and set custom MTU one.
1203-
// This is required for gitpod.io due to the veth change
1204-
// https://github.com/gitpod-io/gitpod/pull/8955
1205-
if createOpts.Options == nil {
1206-
createOpts.Options = make(map[string]string)
1207-
}
1202+
// override MTU value and set custom MTU one.
1203+
// This is required for gitpod.io due to the veth change
1204+
// https://github.com/gitpod-io/gitpod/pull/8955
1205+
if createOpts.Options == nil {
1206+
createOpts.Options = make(map[string]string)
1207+
}
12081208

1209-
netIface, err := netlink.LinkByName("ceth0")
1210-
if err == nil {
1211-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1212-
}
1209+
netIface, err := netlink.LinkByName("eth0")
1210+
if err == nil {
1211+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1212+
}
12131213

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

0 commit comments

Comments
 (0)