Skip to content

Commit

Permalink
Merge "Setting MTU in vmware system"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 18, 2016
2 parents 68e0a8d + eae7629 commit cf689fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrail_provisioning/compute/network.py
Expand Up @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit cf689fb

Please sign in to comment.