Skip to content

Commit 9f96f67

Browse files
kylos101geropl
authored andcommitted
Sync interface name with docker-up and nsinsider
Context: gitpod-io/gitpod#16368 (comment)
1 parent 0043d61 commit 9f96f67

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

1327-
// override MTU value and set custom MTU one.
1328-
// This is required for gitpod.io due to the veth change
1329-
// https://github.com/gitpod-io/gitpod/pull/8955
1330-
if createOpts.Options == nil {
1331-
createOpts.Options = make(map[string]string)
1332-
}
1327+
// override MTU value and set custom MTU one.
1328+
// This is required for gitpod.io due to the veth change
1329+
// https://github.com/gitpod-io/gitpod/pull/8955
1330+
if createOpts.Options == nil {
1331+
createOpts.Options = make(map[string]string)
1332+
}
13331333

1334-
netIface, err := netlink.LinkByName("ceth0")
1335-
if err == nil {
1336-
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1337-
}
1334+
netIface, err := netlink.LinkByName("eth0")
1335+
if err == nil {
1336+
createOpts.Options["com.docker.network.driver.mtu"] = fmt.Sprintf("%v", netIface.Attrs().MTU)
1337+
}
13381338

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

0 commit comments

Comments
 (0)