diff --git a/README b/README index f067c381c..ba74577c0 100644 --- a/README +++ b/README @@ -220,7 +220,7 @@ The following fab command upgrades the live system, should be run from the confi Adding a new compute node to existing cluster --------------------------------------------- - Add all the irequired infromation about the new nodes to testbed.py + Add all the required information about the new nodes to testbed.py cd /opt/contrail/utils fab install_pkg_node:/path/to/contrail-install-packages.rpm | /path/to/contrail-install-packages.deb,, fab add_vrouter_node:, diff --git a/fabfile/tasks/provision.py b/fabfile/tasks/provision.py index 0d493e198..0dc76b177 100644 --- a/fabfile/tasks/provision.py +++ b/fabfile/tasks/provision.py @@ -1544,8 +1544,10 @@ def setup_only_vrouter_node(manage_nova_compute='yes', configure_nova='yes', *ar # Setup hugepages if necessary setup_hugepages_node(host_string) - # Setup affinity mask if necessary + # Setup affinity masks for vRouter and qemu if necessary setup_coremask_node(host_string) + setup_vm_coremask_node(False, host_string) + # Setup vr_mpls_labels, vr_nexthops, vr_vrfs, vr_bridge_entries # if necessary dpdk_increase_vrouter_limit() @@ -2343,18 +2345,18 @@ def setup_vm_coremask_node(q_coremask, *args): for host_string in args: dpdk = getattr(env, 'dpdk', None) if dpdk: - if env.host_string in dpdk: + if host_string in dpdk: try: - vr_coremask = dpdk[env.host_string]['coremask'] + vr_coremask = dpdk[host_string]['coremask'] except KeyError: raise RuntimeError("vRouter core mask for host %s is not defined." \ %(host_string)) else: print "No %s in the dpdk section in testbed file." \ - %(env.host_string) + %(host_string) return else: - print "No dpdk section in testbed file on host %s." %(env.host_string) + print "No dpdk section in testbed file on host %s." %(host_string) return if not vr_coremask: @@ -2366,12 +2368,12 @@ def setup_vm_coremask_node(q_coremask, *args): cpu_count = int(run('grep -c processor /proc/cpuinfo')) except ValueError: print "Cannot count CPUs on host %s. VM core mask cannot be computed." \ - %(env.host_string) + %(host_string) raise if not cpu_count or cpu_count == -1: raise ValueError("Cannot count CPUs on host %s. VM core mask cannot be computed." \ - %(env.host_string)) + %(host_string)) all_cores = [x for x in xrange(cpu_count)] @@ -2422,7 +2424,7 @@ def setup_vm_coremask_node(q_coremask, *args): if sudo("openstack-config --set /etc/nova/nova.conf DEFAULT vcpu_pin_set %s" \ % q_coremask).succeeded: print "QEMU coremask on host %s set to %s." \ - %(env.host_string, q_coremask) + %(host_string, q_coremask) else: raise RuntimeError("Error: setting QEMU core mask %s for host %s failed." \ %(vr_coremask, host_string))