Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Create GCE specific images with correctly configured MTU #2027

Closed
superseb opened this issue Aug 1, 2017 · 2 comments
Closed

Create GCE specific images with correctly configured MTU #2027

superseb opened this issue Aug 1, 2017 · 2 comments

Comments

@superseb
Copy link
Contributor

superseb commented Aug 1, 2017

RancherOS Version: (ros os version)
Any
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
GCE

Follow up on rancher/rancher#8910, documentation will be added for now but would be nice to get GCE specific images built with correctly configured MTU off the bat.

@SvenDowideit SvenDowideit added this to the post 1.1.0 milestone Aug 3, 2017
@SvenDowideit SvenDowideit modified the milestones: v1.1.0, v1.2.0, v1.1.1 Aug 17, 2017
@niusmallnan niusmallnan modified the milestones: v1.1.1, v1.1.2 Dec 15, 2017
niusmallnan added a commit to niusmallnan/os-packer that referenced this issue Dec 18, 2017
niusmallnan added a commit to rancher/os-packer that referenced this issue Dec 18, 2017
@niusmallnan
Copy link
Contributor

niusmallnan commented Dec 18, 2017

Have Built a new image with mtu setting:

#cloud-config
rancher:
  docker:
    extra_args: [--mtu, 1460]
  system_docker:
    extra_args: [--mtu, 1460]

Boot a new VM on GCE, For eth0, docker0, system-docker0, the MTU displays for these devices are incorrect.

[rancher@ros-test-4 ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 42:01:0a:f0:00:08 brd ff:ff:ff:ff:ff:ff
    inet 10.240.0.8/32 brd 10.240.0.8 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::4001:aff:fef0:8/64 scope link
       valid_lft forever preferred_lft forever
3: docker-sys: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 172.18.42.2/16 scope global docker-sys
       valid_lft forever preferred_lft forever
    inet6 fe80::9c61:8eff:febd:a3c0/64 scope link
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:07:b8:d8:21 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

For eth0, Its MTU is determined by DHCP, check the ip route:

bash-4.4# ip route
default via 10.240.0.1 dev eth0 src 10.240.0.3 metric 202  mtu 1460
10.240.0.1 dev eth0 proto kernel scope link src 10.240.0.3 metric 202  mtu 1460
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev docker-sys proto kernel scope link src 172.18.42.2 linkdown

It does not seem to have any effect, MTU is actually correct.

For docker0, after running a container, docker0 mtu will be normal:

[root@ros-test-4 rancher]# docker start e0bc733184f0
e0bc733184f0
[root@ros-test-4 rancher]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 42:01:0a:f0:00:08 brd ff:ff:ff:ff:ff:ff
    inet 10.240.0.8/32 brd 10.240.0.8 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::4001:aff:fef0:8/64 scope link
       valid_lft forever preferred_lft forever
3: docker-sys: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 172.18.42.2/16 scope global docker-sys
       valid_lft forever preferred_lft forever
    inet6 fe80::9c61:8eff:febd:a3c0/64 scope link
       valid_lft forever preferred_lft forever
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc noqueue state UP group default
    link/ether 02:42:07:b8:d8:21 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:7ff:feb8:d821/64 scope link
       valid_lft forever preferred_lft forever
7: vethe3d06f1@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc noqueue master docker0 state UP group default
    link/ether 6e:5b:f6:98:30:0a brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::6c5b:f6ff:fe98:300a/64 scope link
       valid_lft forever preferred_lft forever

The MTU displayed is not correct, I will submit another issue, to continue to pay attention.

@kingsd041
Copy link
Contributor

Tested with RancherOS version- v1.1.2-rc2.
Using the ip route command, I see that the MTU is 1460.
Install Rancher server latest version with the next command:

sudo docker run -d --restart=unless-stopped -p 8080:8080 --name rancher-server rancher/server

Access from browser to http://x.x.x.x:8080/, I can get Rancher Server home page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants