From eae7629d7c71bdee46f4ac9d9871f89d0c72a793 Mon Sep 17 00:00:00 2001 From: Yuvaraja Mariappan Date: Fri, 13 May 2016 12:41:03 -0700 Subject: [PATCH] Setting MTU in vmware system mtu value is set in the data path which is passed from the fab command. This is only applicable in vcenter mode or vcenter-as-compute mode Change-Id: I7ad087fcb8a688eb4f1bb9fa31d27d6b6df9030d Closes-bug: 1570998 --- contrail_provisioning/compute/network.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrail_provisioning/compute/network.py b/contrail_provisioning/compute/network.py index 821641e4..990a2f41 100644 --- a/contrail_provisioning/compute/network.py +++ b/contrail_provisioning/compute/network.py @@ -314,6 +314,7 @@ def _rewrite_net_interfaces_file(self, dev, mac, vhost_ip, netmask, gateway_ip, local("echo ' pre-up ifconfig %s up' >> %s" %(dev, temp_intf_file)) local("echo ' post-down ifconfig %s down' >> %s" %(dev, temp_intf_file)) if (esxi_vm): + local("echo ' pre-up ifconfig %s up mtu %s' >> %s" % (dev, datapg_mtu, temp_intf_file)) device_driver = local("ethtool -i %s | grep driver | cut -f 2 -d ' '" %dev, capture=True) if (device_driver == "vmxnet3"): local("echo ' pre-up ethtool --offload %s rx off' >> %s" %(dev, temp_intf_file)) @@ -340,6 +341,7 @@ def _rewrite_net_interfaces_file(self, dev, mac, vhost_ip, netmask, gateway_ip, with settings(warn_only = True): local("sed -i '/iface %s inet static/, +2d' %s" % (dev, temp_intf_file)) if esxi_vm: + local("echo ' pre-up ifconfig %s up mtu %s' >> %s" % (dev, datapg_mtu, temp_intf_file)) device_driver = local("ethtool -i %s | grep driver | cut -f 2 -d ' '" %dev, capture=True) if (device_driver == "vmxnet3"): local("echo ' pre-up ethtool --offload %s rx off' >> %s" %(dev, temp_intf_file))