aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-29 00:00:26 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-29 01:26:08 +0200
commite4095ec00b9deb968bedfb201c0af12a168a3375 (patch)
tree6f290840e9fd61f113edc3d1c84de9dad9bcc2aa
parent82881d06839023576389cb35db8cbe3d42d9c532 (diff)
[jump vnet] Workaround MTU set race condition
Older libvirt (1.x, 2.x, even older 3.x) try to enforce their own MTU (1500), overriding it back to 1500 after the udev rule finished. Delay link modification with 1 second and extend its patten to also include libvirt's own tap interfaces (<network name>-nic). Change-Id: I3050c11de7f376df02cbf203e9106b61c560683f Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rw-r--r--mcp/scripts/lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 016af2bcb..d7af97c9b 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -550,8 +550,10 @@ function wait_for {
function do_udev_cfg {
local _conf='/etc/udev/rules.d/99-opnfv-fuel-vnet-mtu.rules'
# http://linuxaleph.blogspot.com/2013/01/how-to-network-jumbo-frames-to-kvm-guest.html
- echo 'SUBSYSTEM=="net", ACTION=="add|change", KERNEL=="vnet*", ATTR{mtu}="9000"' |& sudo tee "${_conf}"
- sudo udevadm control --reload || true
+ echo 'SUBSYSTEM=="net", ACTION=="add|change", KERNEL=="vnet*", RUN+="/bin/sh -c '"'/bin/sleep 1; /sbin/ip link set %k mtu 9000'\"" |& sudo tee "${_conf}"
+ echo 'SUBSYSTEM=="net", ACTION=="add|change", KERNEL=="*-nic", RUN+="/bin/sh -c '"'/bin/sleep 1; /sbin/ip link set %k mtu 9000'\"" |& sudo tee -a "${_conf}"
+ sudo udevadm control --reload
+ sudo udevadm trigger
}
function do_sysctl_cfg {