So I’m finding myself setting up a cloud-init for every instance I have, in most cases “just” to set the MTU to be 2 less than the network MTU, in order to get external connectivity. This seems to be an unsustainable amount of unnecessary work.
Is there any way to set the instance MTU independently of the network MTU somewhere in the profile?
Background
My scenario is that I tune the MTU so it works for OVN internal traffic. Everything is happy including traffic between the cluster and the remote cluster over an OVN-IC link (via WG). However traffic via the OVN gateway out to the Internet hits fragmentation (this is just going out directly via a NAT generic router). In order to combat this, I change the instance MTU to be network MTU - 2, everything happy.
So, I reduce the network MTU by 2 and restart. Broken again, hitting fragmentation on external traffic. I set the instance MTU to be the new network MTU -2. Everything happy.
[Repeat until we hit 1280 and it won’t let me go any lower]
I set up cloud-init to configure MTU on each instance to 1280 with the network MTU set at 1300.
Everything very happy … except me and the OCI instances I just can’t get to take any sort of cloud-init or custom boot script.
I don’t understand “why” the instance MTU needs to be 2 less than the network MTU, and if there’s a way to remove this limitation that would be great, but I’ve no leads on how to do this. Otherwise, something in the settings like “instance MTU offset”, or the ability to set the instance MTU independently of the network MTU would work …