From: Peter Mikus Date: Mon, 25 Feb 2019 16:03:21 +0000 (+0000) Subject: CSIT-1448 Ansible: Clean hugepage configuration X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=d978e8c6d58a8c37a3ff80a7a52e35b6574be553 CSIT-1448 Ansible: Clean hugepage configuration Change-Id: I1e91d63bb5cd671d2d1d94f8711233bec0fe6505 Signed-off-by: Peter Mikus --- diff --git a/resources/tools/testbed-setup/README.rst b/resources/tools/testbed-setup/README.rst index 738dffad49..14871d1d29 100644 --- a/resources/tools/testbed-setup/README.rst +++ b/resources/tools/testbed-setup/README.rst @@ -173,8 +173,6 @@ Prerequisities for running Ansible machines that will be provisioned (does not need to be PXE server). - User `testuser` with password `Csit1234` is created with home folder initialized on all target machines that will be provisioned. -- SSH keys for no pass access are copied to all target machines that will be - provisioned: `ssh-copy-id x.x.x.x`. - Inventory directory is created with same or similar content as `inventories/lf_inventory` in `inventories/` directory (`sample_inventory` can be used). @@ -187,7 +185,8 @@ Ansible structure ................. Ansible is defining roles `TG` (Traffic Generator), `SUT` (System Under Test), -`VPP_DEVICE` (vpp_device host for functional testing). +`VPP_DEVICE` (vpp_device host for functional testing). `COMMON` (Applicable +for all servers in inventory). Each Host has corresponding Ansible role mapped and is applied only if Host with that role is present in inventory file. As a part of optimization the role @@ -228,12 +227,23 @@ Ansible structure is described below: ├── vault.yml # Ansible vualt storage. └── vpp_device.yaml # vpp_device playbook. +Tagging +....... + +Every task, handler, role, playbook is tagged with self-explanatory tags that +could be used to limit which objects are applied to target systems. + +You can see which tags are applied to tasks, roles, and static imports by +running `ansible-playbook` with the `--list-tasks` option. You can display all +tags applied to the tasks with the `--list-tags` option. + Running Ansible ............... #. Go to ansible directory: `cd csit/resources/tools/testbed-setup/ansible` #. Run ansible on selected hosts: - `ansible-playbook --vault-id vault_pass --extra-vars '@vault.yml' --inventory site.yaml --limit x.x.x.x` + `ansible-playbook --vault-password-file=vault_pass --extra-vars '@vault.yml' + --inventory site.yaml --limit x.x.x.x` .. note:: diff --git a/resources/tools/testbed-setup/ansible/.gitignore b/resources/tools/testbed-setup/ansible/.gitignore new file mode 100644 index 0000000000..bed1e33b88 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/.gitignore @@ -0,0 +1 @@ +site.retry \ No newline at end of file diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml index c464ad8da2..4d96a39496 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/group_vars/all.yaml @@ -1,13 +1,13 @@ --- # file: group_vars/all.yaml -# General settings +# General variables ansible_python_interpreter: '/usr/bin/python2.7' ansible_become_pass: '{{ inventory_sudo_pass }}' -# Domain is used in /etc/hosts file on target machine. -domain: 'linuxfoundation.org' -# DNS is used in /etc/netplan/01-netcfg.yaml -dns_servers: "[ 199.204.44.24, 199.204.47.54 ]" +# name_servers_search is used in /etc/hosts file on target machine. +name_servers_search: 'linuxfoundation.org' +# name_servers is used in /etc/netplan/01-netcfg.yaml +name_servers: "[ 199.204.44.24, 199.204.47.54 ]" # Proxy settings: Uncomment and fill the proper values. These variables will be # set globally by writing into /etc/environment file on target machine. diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.16.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.16.yaml index 25401e33f3..3bf651e5e1 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.16.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.16.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.16.yaml hostname: "t1-tg1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.17.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.17.yaml index ac3f9fa310..558cfd4cbf 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.17.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.17.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.17.yaml hostname: "t1-sut1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.18.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.18.yaml index e96ed37d89..f33f7629b3 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.18.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.18.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.18.yaml hostname: "t1-sut2" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.20.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.20.yaml index 91eb9fc9ca..1ab5df17d1 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.20.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.20.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.20.yaml hostname: "t2-tg1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.21.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.21.yaml index 84a72542e9..d3c552f384 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.21.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.21.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.21.yaml hostname: "t2-sut1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.22.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.22.yaml index 5d7aaa5bee..1f6157f88d 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.22.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.22.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.22.yaml hostname: "t2-sut2" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.24.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.24.yaml index 88e5148dfb..cd4b466c7d 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.24.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.24.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.24.yaml hostname: "t3-tg1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.25.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.25.yaml index 144e449b4a..402944bc44 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.25.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.25.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.25.yaml hostname: "t3-sut1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.26.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.26.yaml index d860ef216d..fdf70dffbe 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.26.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.26.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.26.yaml hostname: "t3-sut2" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + isolcpus: "1-17,19-35" + nohz_full: "1-17,19-35" + rcu_nocbs: "1-17,19-35" +sysctl: + kernel: + watchdog_cpumask: "0,18" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.36.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.36.yaml index e405b8064d..e015def65b 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.36.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.36.yaml @@ -2,6 +2,14 @@ # file: host_vars/10.30.51.36.yaml hostname: "s17-t33-sut1" -isolcpus: "1-15,17-31,33-47,49-63" -cfs_cpus: "0,16,32,48" +grub: + isolcpus: "1-15,17-31,33-47,49-63" + nohz_full: "1-15,17-31,33-47,49-63" + rcu_nocbs: "1-15,17-31,33-47,49-63" +sysctl: + kernel: + watchdog_cpumask: "0,16,32,48" + vm: + nr_hugepages: 4096 + max_map_count: 20000 taishan_workaround: True diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.37.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.37.yaml index ece3a752aa..e29c00a97c 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.37.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.37.yaml @@ -2,6 +2,14 @@ # file: host_vars/10.30.51.37.yaml hostname: "s18-t33-sut2" -isolcpus: "1-15,17-31,33-47,49-63" -cfs_cpus: "0,16,32,48" +grub: + isolcpus: "1-15,17-31,33-47,49-63" + nohz_full: "1-15,17-31,33-47,49-63" + rcu_nocbs: "1-15,17-31,33-47,49-63" +sysctl: + kernel: + watchdog_cpumask: "0,16,32,48" + vm: + nr_hugepages: 4096 + max_map_count: 20000 taishan_workaround: True diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.44.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.44.yaml index bdaeed5407..4776829b29 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.44.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.44.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.44.yaml hostname: "s3-t21-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.45.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.45.yaml index d12c763516..2715ea7118 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.45.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.45.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.45.yaml hostname: "s4-t21-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.46.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.46.yaml index 8e38586f7f..850b206dd7 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.46.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.46.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.46.yaml hostname: "s11-t31-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.47.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.47.yaml index a3d05730da..49da361833 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.47.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.47.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.47.yaml hostname: "s12-t31-sut2" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.48.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.48.yaml index f6a77e8be3..ef18a47baa 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.48.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.48.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.48.yaml hostname: "s13-t31-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.49.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.49.yaml index 9aad58a00b..64439733f5 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.49.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.49.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.49.yaml hostname: "s19-t33t34-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.50.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.50.yaml index 55b8655e8c..87e336a958 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.50.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.50.yaml @@ -2,5 +2,5 @@ # file: host_vars/10.30.51.50.yaml hostname: "s1-t11-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + nr_hugepages: 65536 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.51.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.51.yaml index 42eeea814d..ff2f805484 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.51.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.51.yaml @@ -2,5 +2,5 @@ # file: host_vars/10.30.51.51.yaml hostname: "s2-t12-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + nr_hugepages: 65536 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml index 7eb994a8a2..2bc3fdeb7a 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.52.yaml hostname: "s5-t22-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 65536 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml index 938bcecd30..c9c51b8444 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.53.yaml hostname: "s6-t22-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml index 9a3de32d3d..877fab7806 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.54.yaml hostname: "s7-t23-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml index 2014e01dea..b5fa1ac685 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.55.yaml hostname: "s8-t23-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.56.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.56.yaml index 1d926f56a9..d1efda22e3 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.56.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.56.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.56.yaml hostname: "s9-t24-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.57.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.57.yaml index e5bddf33f8..162509deed 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.57.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.57.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.57.yaml hostname: "s10-t24-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.58.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.58.yaml index 0e854fdeb0..cb21647678 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.58.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.58.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.58.yaml hostname: "s14-t32-sut1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.59.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.59.yaml index 4647606980..b38bea10ab 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.59.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.59.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.59.yaml hostname: "s15-t32-sut2" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 36864 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.60.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.60.yaml index 27f5b45645..106fba7dd1 100644 --- a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.60.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.60.yaml @@ -2,5 +2,13 @@ # file: host_vars/10.30.51.60.yaml hostname: "s16-t32-tg1" -isolcpus: "1-27,29-55,57-83,85-111" -cfs_cpus: "0,28,56,84" +grub: + isolcpus: "1-27,29-55,57-83,85-111" + nohz_full: "1-27,29-55,57-83,85-111" + rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + kernel: + watchdog_cpumask: "0,28,56,84" + vm: + nr_hugepages: 4096 + max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml index 6cefdb4cc3..89235e89c3 100644 --- a/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml +++ b/resources/tools/testbed-setup/ansible/inventories/sample_inventory/host_vars/1.1.1.1.yaml @@ -2,5 +2,13 @@ # file: host_vars/x.x.x.x.yaml hostname: "t1-tg1" -isolcpus: "1-17,19-35" -cfs_cpus: "0,18" +grub: + - isolcpus: "1-27,29-55,57-83,85-111" + - nohz_full: "1-27,29-55,57-83,85-111" + - rcu_nocbs: "1-27,29-55,57-83,85-111" +sysctl: + - kernel: + - watchdog_cpumask: "0,28,56,84" + - vm: + - nr_hugepages: 4096 + - max_map_count: 20000 diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml index 1481536034..6844358eca 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml @@ -22,7 +22,7 @@ lineinfile: path: '/etc/hosts' regexp: '^{{ ansible_default_ipv4.address }}.+$' - line: '{{ ansible_default_ipv4.address }} {{ hostname }}.{{ domain }}' + line: '{{ ansible_default_ipv4.address }} {{ hostname }}.{{ name_servers_search }}' tags: set-hostname - name: Set sudoers admin diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit index e96547e4d7..0c9036e936 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/90-csit @@ -1,6 +1,6 @@ # change the minimum size of the hugepage pool. # 2G VPP, 16x2G for Fullbox VM, 2G reserve -vm.nr_hugepages=36864 +vm.nr_hugepages={{ sysctl.vm.nr_hugepages }} # this file contains the maximum number of memory map areas a process # may have. memory map areas are used as a side-effect of calling @@ -11,7 +11,7 @@ vm.nr_hugepages=36864 # programs, particularly malloc debuggers, may consume lots of them, # e.g., up to one or two maps per allocation. # must be greater than or equal to (2 * vm.nr_hugepages). -vm.max_map_count=200000 +vm.max_map_count={{ sysctl.vm.max_map_count }} # hugetlb_shm_group contains group id that is allowed to create sysv # shared memory segment using hugetlb page. @@ -77,4 +77,4 @@ kernel.randomize_va_space=0 # typically this value would only be touched in the nohz_full case # to re-enable cores that by default were not running the watchdog, # if a kernel lockup was suspected on those cores. -kernel.watchdog_cpumask={{ cfs_cpus }} +kernel.watchdog_cpumask={{ sysctl.kernel.watchdog_cpumask }} diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config index 2602f93b4f..7a6ae9e468 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/files/netplan_config @@ -9,4 +9,4 @@ network: dhcp4: false gateway4: {{ ansible_default_ipv4["gateway"] }} nameservers: - addresses: {{ dns_servers }} + addresses: {{ name_servers }} diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml index afaf5cd06b..591002606b 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/aarch64.yaml @@ -6,7 +6,7 @@ path: '/etc/default/grub' state: 'present' regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} intel_iommu=on nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1"' + line: 'GRUB_CMDLINE_LINUX="isolcpus={{ grub.isolcpus }} nohz_full={{ grub.nohz_full }} rcu_nocbs={{ grub.rcu_nocbs }} intel_iommu=on nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1"' notify: ['Update GRUB'] tags: set-grub diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml index 5c7110e289..e5a2ad3c7a 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/x86_64.yaml @@ -6,7 +6,7 @@ path: '/etc/default/grub' state: 'present' regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"' + line: 'GRUB_CMDLINE_LINUX="isolcpus={{ grub.isolcpus }} nohz_full={{ grub.nohz_full }} rcu_nocbs={{ grub.rcu_nocbs }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"' notify: ['Update GRUB'] tags: set-grub diff --git a/resources/tools/testbed-setup/ansible/roles/vpp_device/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp_device/tasks/main.yaml index d07f328424..c3fbfeb1c6 100644 --- a/resources/tools/testbed-setup/ansible/roles/vpp_device/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/vpp_device/tasks/main.yaml @@ -25,6 +25,6 @@ path: '/etc/default/grub' state: 'present' regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages=65536"' + line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages={{ grub.nr_hugepages }}"' notify: ['Update GRUB'] - + tags: set-grub diff --git a/resources/tools/testbed-setup/ansible/vault.yml b/resources/tools/testbed-setup/ansible/vault.yml index ff526ce723..8f75700a09 100644 --- a/resources/tools/testbed-setup/ansible/vault.yml +++ b/resources/tools/testbed-setup/ansible/vault.yml @@ -1,27 +1,86 @@ $ANSIBLE_VAULT;1.1;AES256 -65353063336230383530643630643332633166623761643736666630353562363230313637653637 -3666613437643132336162653561356638623062333464390a643331386264333966333766643034 -66373733346133376665666439356533303635343663343034643662336634333033306338386263 -3032313839356363350a303264646333306236336631643637323939633737393637633462336365 -38396231353237303033343962626332616562643434663963373739326337656130313139623766 -65666664353264613633313431643336396563326266623766386336646332343232303264623131 -66633930386138353839396361393032333362636662383332383864663262333366343636376535 -31336437333065333134396162326133363334396639386264663234386465323833316234336463 -36666534326434383737306663353561336335383631643362633261656363616161336562333766 -61656636643062646533396639383666363136393836373463653337373034326166626332346439 -34373165326638386235313932613435616163346234363436336363346362666662336465623935 -65373238393034313563363334303830313738333366323962643535616239656564636332383165 -32353733323638373865393136343339356162653639303965386664626261303364353963633764 -39333830366432666137353334643362613038656230353563333834363738316564316238623938 -37336237313438663162333163666332636534666437376634386231363839653766396636636239 -66356636666165333633633432383933303435663836383863306535386564343234323532623366 -64346263666563356538653031366635643136396633363136616131386630366239613538313131 -31663636323465353930326432346333333666316331366237316364363461373836323535616538 -38616266616332666238396232353766306435616262633831636161643039323534303338633764 -62326561343634663638323366353239306561376462623866643264346664376562633730313537 -38303433353665616535666335663337353630333466353634633933643435646336666632613535 -63636136323966373935313462626337643339303565326130383461616636383237653966656233 -66326634303131373238306532336233306432653334613937386435623235386631386432336461 -33323161333361343032383937613231636630613565313431623937393131363661346536393762 -65323031393964346132656538306538333136353533346164383066313336333736623535303966 -6433646665643235346130353333393533616132356339363637 +30376536326632653166363236653465343033356264353839636231396564336338613335393164 +6666663765663664656665393034336538333731393863640a343337343739313266393063373637 +34383438656166303961373038373465323939333337666266656634326633393136333764643061 +3839623938643064320a386431376632313933666638306261333161396535343936393536326430 +38393835303931383166633136643531666338383661343833356237376265613461356165326262 +65346232386434393137623463623239323430326338633563646461383938653437613634336632 +38616337623662623930373237633936306231386337353536333238366133643061376463373437 +38616132643561613663383533666332623334636461393535313930316461356430303238306332 +38376533663062666438363639346436366266643532356236363738653432623536326266623633 +62633135386138393737373365656465316433623934656266333534346430316265613064646633 +34393566326332396564656234636231393330353639386337326131326665643865386466386331 +62613938363730373132323934666661383061613136346261353934303830623535333032623731 +62316163646231623666393665313939656366346432623631396661636535303762633062626331 +32643139343836623035623534333865313435393961383866303433373831653731306638653237 +38396533646330323838653162363435633030613334353965643132663632653837613266323739 +37313235623830656436326561303935623665383534303436636663653439643835663139343239 +64653662373837306330336662623766383135356232383238303664663235346231353939396331 +61326565333661653262656166643033653235636338643734333363336332333332636531313235 +61343161613366663637626462376334323032313463316661363766623161663832376661376363 +31326639386566663533346334383131326530323263626636646237386334613263323839386564 +39303732366362303162363330363238363030396261313566646530626362333261663966303034 +66333930333866303962356331303238306631336530383466633030313734323534613266633938 +61373763656663383230343563613537376363396331326434303032356635346231306636353132 +65373038333636373362336230386534386661333332373535633762323566623038626261663933 +32663031336165633333646438613666316562323263353731313735343234313234316261333335 +35326532376662373663366537333736373030356435376231393566663236376231633261393765 +33643166326234373436316330343264353032373030623736323162653062306232396265313234 +63363438393631376539653935326232626561346265633161326135616437613163643139333831 +65623962393939316533396664313932303730646138323761356266653861323635373166633061 +62323133316136366333386131343962346165376362376365313936353436646434313265333432 +33613432663666643361343161623731646561616464333530613164656566633931346665346537 +39313239653538656137333931373633636139633338333364373239366463353733323732373062 +39353938616139323463393730643733633338363763383265373264363136353335353431663537 +35326466396137663965326564353739356437366464376332633036303061663436623133396131 +37663965386136373532666632363862616337636633653264343331636363303166653733663834 +66656133653363303361636361616134306263383833346361346662353466363133303935306632 +33353537353637633262353366346534636662663531373232356536633735316565663432646361 +63383635376263646164363364666633373734613063363366376365393632623835383432333235 +30643136633039626239666163316434353333303739333761656365383764656132316537343966 +30643764333538323866313538626435663665663232323934333032653464663530633364316261 +30313161323839383662333036316562633937386636643462373439376165646432393765653539 +34303162316136643639643064363636383439616238626264383563313633326637333936373932 +38336435303663636466396637313061356261353431346361373037613737393364306234653038 +35663734643065336362373562313262323330396365613566633038643632633232366638323335 +39303933623837323163356430663330323433363038373530376439303933663434363365636338 +64653366626138656535303766323735626331303731626439343766313732643336363735353438 +37643433326464353661613664376639633631393462386131316663323935356535626164626363 +34623061663837636362363862616564353631633162396637393739643933306134626234656131 +66626464636636366663333238636135343938343333626238656339376239306261313937343666 +31353764326662666639623637366533623463393030636233626661313132393363316564343664 +37303866366531373136303731386638396562623837323666333238353732313162623537356636 +31396366653539336564363761663532653664663263653438303932346566373066353865373430 +65643264326635613762666465313638363132343537623034326465323937346463613263636231 +66653835616633383134656434326665373536663630316237343664396565383930373863366339 +62643961393534636161653832363736313039626330323766326238653861373735363339333636 +63616433343664323366666338376233366637313363633263353564326339326465666233353564 +31626664363061636437356332646238396331303739643637373533626261646531333534393232 +63613461356530613064343431336365653332366635666339656631306235616561613030363664 +39333438313865393632393535633865346431633139623565376363613933313536333335383030 +38633165346462383337313562616631323866636566373833626335363433343430646165383236 +32333266313065313764313062313162616536626266323061643733356164373062623533643432 +37353332343161666136313963613564626265633664356366383330643562363564396134383038 +32396362346666643833663266353131643736333333353430323035363131353663643365363233 +35303932383435396131663566383233623033633965363433356239316634653031333835353563 +38626564386531613135386161346439666134623134343632363234646638376233366136653636 +32373566373666613333323065626465653562656336336532383930633938303564353732373831 +64646631333535313562393634303464303932316632663463356663316538306666316335643631 +66366666633662623362396336386239356134363535666130666666636562643235363462303536 +36323364353735623266356537393732376438353531623930326664376661333933353436306339 +32386334623436343439343930336363366338623832343633653631633435353233356330366662 +37396139646364643934363331323035663830383864666538313965353463353362313631396537 +65353462333033633534376232653961306339363064376432326335353561323162353163356538 +31303232313739343331656164633332393337613433326364316432303733663663643163396664 +38616337356361616162353237373635653335326464336339653635356533326666666165616635 +62326432383565386266333633626130363063323630663635343363343261633837376436393936 +66366161386535316265613566313164656262343866666531363334366361663264653539343036 +65393061373538356637343733613036303435306565643338353930376565356665633865383339 +65326263323031363332356230373964373364623861353662363430656339383664613961373566 +66393733656635366266396665316164383464303438326232663463316532363631333538376364 +33336164373035353665333833306564633636653132393235323730333132313435316339303132 +63636663333038363338333562613032383135353033323964333336386666613337363737366230 +34646461323766323431663762666464613538663933396639316132653865373763633230626436 +35303365336663663236613832373137353333323534653031643934626232323530356136626461 +34373533313631626562653661616162333631336235323136366237633462666335376433323431 +6337