Page MenuHomePhabricator

Fix MTU on single-NIC Ceph nodes
Closed, InvalidPublic

Description

We currently set MTU 9000 for both the Ceph 'public' (i.e. cloud-hosts*) and 'cluster' (i.e. cloud-storage*) network interfaces in Puppet:

profile::cloudceph::osd
# Tune the MTU on both the cluster and public network
interface::setting { 'osd-cluster-mtu':
    interface => $cluster_iface,
    setting   => 'mtu',
    value     => '9000',
    before    => Class['ceph::common'],
    notify    => Exec['set-osd-cluster-mtu'],
}
interface::setting { 'osd-public-mtu':
    interface => $public_iface,
    setting   => 'mtu',
    value     => '9000',
    before    => Class['ceph::common'],
    notify    => Exec['set-osd-public-mtu'],
}

However, since T405478: Experiment with cloudcephosd1050 and cloudcephosd1051 in single-nic configuration / T399180: Cloudcephosd: migrate to single network uplink, the 'cluster' interface on some nodes is a VLAN on the 'public' interface, so there's an additional 802.1Q tag limiting the MTU. So we'll need to adjust the Puppetization for that.

Specifically: the cluster interface in the single nic case will have 8996 MTU (i.e. 9000 - 4 bytes for the vlan tag). Public interface stays at 9000 in single and double nic cases.

Event Timeline

Restricted Application added a subscriber: • Aklapper. · View Herald Transcript

Change #1202382 had a related patch set uploaded (by Filippo Giunchedi; author: Filippo Giunchedi):

[operations/puppet@production] cloudceph: adjust mtu on cluster interface for single-nic

https://gerrit.wikimedia.org/r/1202382

Specifically: the cluster interface in the single nic case will have 8996 MTU (i.e. 9000 - 4 bytes for the vlan tag). Public interface stays at 9000 in single and double nic cases.

I don't believe this is a worry on Linux. The MTU setting in Linux sets the L3MTU, all wire-line L2 headers are not included in the value. So if both the untagged interface and the tagged interface have an MTU of 9000 that means they can send IP packets of that size. The network supports 9192 everywhere to allow for additional layer-2 headers, so on the wire we should be ok.

Ran a quick test to confirm here, interfaces set up like this, a tagged and an untagged one both with mtu=1500

root@officepc:~# ip -4 -br addr show 
lo               UNKNOWN        127.0.0.1/8 
veth1.100@veth1  UP             100.64.0.2/30 
veth1@if4        UP             198.18.0.2/30
root@officepc:~# ip --json link show veth1 | jq .[].mtu
1500
root@officepc:~# ip --json link show veth1.100 | jq .[].mtu
1500

I can send some pings from these to the other side:

root@officepc:~# ping -c 2 -s 1472 -M do 198.18.0.1
PING 198.18.0.1 (198.18.0.1) 1472(1500) bytes of data.
1480 bytes from 198.18.0.1: icmp_seq=1 ttl=64 time=0.033 ms
1480 bytes from 198.18.0.1: icmp_seq=2 ttl=64 time=0.075 ms
root@officepc:~# ping -c 2 -s 1472 -M do 100.64.0.1
PING 100.64.0.1 (100.64.0.1) 1472(1500) bytes of data.
1480 bytes from 100.64.0.1: icmp_seq=1 ttl=64 time=0.041 ms
1480 bytes from 100.64.0.1: icmp_seq=2 ttl=64 time=0.047 ms

A tcpdump on the far side shows the larger packets received for the tagged traffic, the interface MTU is not restricting this:

root@officepc:~# sudo tcpdump -i veth0 -l -p -nn -e icmp
listening on veth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
18:30:32.397838 32:30:6d:91:9a:56 > ae:fc:eb:95:36:9a, ethertype IPv4 (0x0800), length 1514: 198.18.0.2 > 198.18.0.1: ICMP echo request, id 17242, seq 1, length 1480
18:30:32.397856 ae:fc:eb:95:36:9a > 32:30:6d:91:9a:56, ethertype IPv4 (0x0800), length 1514: 198.18.0.1 > 198.18.0.2: ICMP echo reply, id 17242, seq 1, length 1480
18:30:33.400086 32:30:6d:91:9a:56 > ae:fc:eb:95:36:9a, ethertype IPv4 (0x0800), length 1514: 198.18.0.2 > 198.18.0.1: ICMP echo request, id 17242, seq 2, length 1480
18:30:33.400119 ae:fc:eb:95:36:9a > 32:30:6d:91:9a:56, ethertype IPv4 (0x0800), length 1514: 198.18.0.1 > 198.18.0.2: ICMP echo reply, id 17242, seq 2, length 1480
18:30:36.754674 32:30:6d:91:9a:56 > ae:fc:eb:95:36:9a, ethertype 802.1Q (0x8100), length 1518: vlan 100, p 0, ethertype IPv4 (0x0800), 100.64.0.2 > 100.64.0.1: ICMP echo request, id 17247, seq 1, length 1480
18:30:36.754697 ae:fc:eb:95:36:9a > 32:30:6d:91:9a:56, ethertype 802.1Q (0x8100), length 1518: vlan 100, p 0, ethertype IPv4 (0x0800), 100.64.0.1 > 100.64.0.2: ICMP echo reply, id 17247, seq 1, length 1480
18:30:37.783485 32:30:6d:91:9a:56 > ae:fc:eb:95:36:9a, ethertype 802.1Q (0x8100), length 1518: vlan 100, p 0, ethertype IPv4 (0x0800), 100.64.0.2 > 100.64.0.1: ICMP echo request, id 17247, seq 2, length 1480
18:30:37.783508 ae:fc:eb:95:36:9a > 32:30:6d:91:9a:56, ethertype 802.1Q (0x8100), length 1518: vlan 100, p 0, ethertype IPv4 (0x0800), 100.64.0.1 > 100.64.0.2: ICMP echo reply, id 17247, seq 2, length 1480

Huh, TIL, thanks! And sorry for me panicing over nothing in that case.

Change #1202382 abandoned by Filippo Giunchedi:

[operations/puppet@production] cloudceph: adjust mtu on cluster interface for single-nic

Reason:

Per task, not needed

https://gerrit.wikimedia.org/r/1202382