Skip to content

Commit

Permalink
Merge "Adding fab task to increase vrouter limit"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 21, 2015
2 parents 180eee0 + 233270f commit 4d1e8cf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions fabfile/tasks/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,7 @@ def setup_all(reboot='True'):
execute('setup_remote_syslog')
execute('add_tsn', restart=False)
execute('add_tor_agent', restart=False)
execute('increase_vrouter_limit')
if reboot == 'True':
print "Rebooting the compute nodes after setup all."
execute('compute_reboot')
Expand Down Expand Up @@ -1880,6 +1881,7 @@ def setup_without_openstack(manage_nova_compute='yes', reboot='True'):
execute('setup_remote_syslog')
execute('add_tsn', restart=False)
execute('add_tor_agent', restart=False)
execute('increase_vrouter_limit')
if reboot == 'True':
print "Rebooting the compute nodes after setup all."
execute(compute_reboot)
Expand Down Expand Up @@ -2054,6 +2056,7 @@ def reset_config():
execute(restart_collector)
execute(add_tsn)
execute(add_tor_agent)
execute('increase_vrouter_limit')
sleep(120)
except SystemExit:
execute(config_server_reset, 'delete', [env.roledefs['cfgm'][0]])
Expand Down Expand Up @@ -2248,3 +2251,18 @@ def setup_zones():
setup_esx_zone()
#end setup_zones

@task
def increase_vrouter_limit():
"""Increase the maximum number of mpls label and nexthop on tsn node"""
vrouter_module_params_dict = getattr(env, 'vrouter_module_params', None)
if vrouter_module_params_dict:
for host_string in vrouter_module_params_dict:
cmd = "options vrouter"
cmd += " vr_mpls_labels=%s" % vrouter_module_params_dict[host_string].setdefault('mpls_labels', '5120')
cmd += " vr_nexthops=%s" % vrouter_module_params_dict[host_string].setdefault('nexthops', '65536')
cmd += " vr_vrfs=%s" % vrouter_module_params_dict[host_string].setdefault('vrfs', '5120')
cmd += " vr_bridge_entries=%s" % vrouter_module_params_dict[host_string].setdefault('macs', '262144')
with settings(host_string=host_string, warn_only=True):
sudo("echo %s > %s" %(cmd, '/etc/modprobe.d/vrouter.conf'))

# end increase_vrouter_limit
6 changes: 6 additions & 0 deletions fabfile/testbeds/testbed_multibox_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,3 +507,9 @@
# coremask - Specify CPU affinity mask to run vRouter with. Supported formats:
# hexadecimal, comma-sepparated list of CPUs, dash-separated range
# of CPUs.
# OPTIONAL vrouter limit parameter
# ==================================
#env.vrouter_module_params = {
# host4:{'mpls_labels':'131072', 'nexthops':'131072', 'vrfs':'65536', 'macs':'262144'},
# host5:{'mpls_labels':'131072', 'nexthops':'131072', 'vrfs':'65536', 'macs':'262144'}
#}
5 changes: 5 additions & 0 deletions fabfile/testbeds/testbed_singlebox_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,8 @@
# coremask - Specify CPU affinity mask to run vRouter with. Supported formats:
# hexadecimal, comma-sepparated list of CPUs, dash-separated range
# of CPUs.
# OPTIONAL vrouter limit parameter
# ==================================
#env.vrouter_module_params = {
# host1:{'mpls_labels':'131072', 'nexthops':'131072','vrfs':'65536','macs':'262144'},
#}

0 comments on commit 4d1e8cf

Please sign in to comment.