From fc9d16842e1a5aa7191bfa012fc42932bbaabc2a Mon Sep 17 00:00:00 2001 From: pmikus Date: Thu, 15 Oct 2020 09:14:49 +0000 Subject: Ansible: Rework grub command line Signed-off-by: pmikus Change-Id: I8abfc47e5e816e2ab4b39d7ad7575e672ae19ca6 --- .../ansible/roles/performance_tuning/defaults/main.yaml | 8 +------- .../ansible/roles/performance_tuning/tasks/main.yaml | 2 +- .../tools/testbed-setup/ansible/roles/vpp_device/tasks/main.yaml | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'resources/tools/testbed-setup/ansible/roles') diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml index edec57aba0..612bc5a946 100644 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml @@ -14,10 +14,4 @@ packages_by_arch: aarch64: - [] x86_64: - - [] - -grub_cmdline_linux: - aarch64: - - "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\"" - x86_64: - - "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\"" + - [] \ No newline at end of file diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml index 3a8f35b57f..c437b40f86 100644 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml @@ -19,7 +19,7 @@ path: "/etc/default/grub" state: "present" regexp: "^GRUB_CMDLINE_LINUX=" - line: "{{ grub_cmdline_linux[ansible_machine] | join() }}" + line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\"" notify: - "Update GRUB" tags: 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 b93853b01f..33b551715f 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 @@ -82,7 +82,7 @@ path: "/etc/default/grub" state: "present" regexp: "^GRUB_CMDLINE_LINUX=" - line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages={{ grub.nr_hugepages }}"' + line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\"" notify: - "Update GRUB" - "Reboot server" -- cgit 1.2.3-korg