Skip to content

Commit

Permalink
Setting MTU in vmware system
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ymariappan committed May 13, 2016
1 parent d4cc084 commit eae7629
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrail_provisioning/compute/network.py
Original file line number Diff line number Diff line change
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 eae7629

Please sign in to comment.