diff options
author | 2020-11-16 12:23:48 +0000 | |
---|---|---|
committer | 2020-11-16 12:42:06 +0000 | |
commit | e78e0a7028dd1faa917289aa6e88b3ca63700ff0 (patch) | |
tree | 3d989098e48dd211729afa5b7b7dd376093e29f8 /resources/tools/testbed-setup/ansible/roles/calibration/tasks | |
parent | e8b780ab663641ee1e0bae9c9261431d85c864db (diff) |
2n-zn2 Epyc backport
- Better to get it fully aligned then cherry-pick spaghetti.
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: If223ef3f0247413d53225eb57f8903a7675632e3
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/calibration/tasks')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml index e88c39c180..a6e8898f9d 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml @@ -1,7 +1,7 @@ --- # file: roles/calibration/tasks/main.yaml -- name: Calibration - Install Distribution - Release - Machine Prerequisites +- name: Install Distribution - Release - Machine Prerequisites package: name: "{{ packages | flatten(levels=1) }}" state: latest @@ -9,41 +9,42 @@ tags: - install-dependencies -- name: Calibration - Check CPU Power States +- name: Check CPU Power States shell: "lscpu" register: current_lscpu changed_when: false - failed_when: | - 'CPU min MHz' in current_lscpu.stdout and - 'Intel(R) Xeon(R)' in current_lscpu.stdout tags: - check-cpu-frequency -- name: Calibration - Check Kernel Version of "{{ kernel_version }}" - shell: "uname -r" - register: current_kernel_version - changed_when: false - failed_when: | - current_kernel_version.stdout not in kernel_version +- name: Check CPU Power States + assert: + that: + - "'CPU min MHz' not in current_lscpu.stdout or 'Intel(R) Xeon(R)' not in ansible_processor" + fail_msg: "CPU configuration!" + success_msg: "CPU configuration match." tags: - - check-kernel-version + - check-cpu-frequency -- name: Calibration - Check Kernel Parameters - shell: "cat /proc/cmdline" - register: current_kernel_parameters - changed_when: false - failed_when: | - 'isolcpus' not in current_kernel_parameters.stdout or - 'nohz_full' not in current_kernel_parameters.stdout or - 'rcu_nocbs' not in current_kernel_parameters.stdout or - 'processor.max_cstate=1' not in current_kernel_parameters.stdout or - 'nmi_watchdog=0' not in current_kernel_parameters.stdout or - 'intel_iommu=on' not in current_kernel_parameters.stdout or - 'nosoftlockup' not in current_kernel_parameters.stdout +- name: Check Kernel Parameters + assert: + that: + - item in ansible_cmdline and grub[item] == ansible_cmdline[item] + fail_msg: "Kernel parameters!" + success_msg: "Kernel parameters match." + loop: "{{ grub.keys()|sort }}" tags: - - check-cmdline + - check-kernel-params + +- name: Check Kernel Version + assert: + that: + - ansible_kernel not in kernel_version_by_distro_by_arch + fail_msg: "Kernel version!" + success_msg: "Kernel version match." + tags: + - check-kernel-version -- name: Calibration - Get Spectre Meltdown Checker +- name: Get Spectre Meltdown Checker get_url: url: "https://meltdown.ovh" dest: "/opt/spectre-meltdown-checker.sh" @@ -51,7 +52,7 @@ tags: - check-spectre-meltdown -- name: Calibration - Run Spectre Meltdown Checker +- name: Run Spectre Meltdown Checker shell: "/opt/spectre-meltdown-checker.sh --no-color || true" async: 60 poll: 0 @@ -60,13 +61,13 @@ tags: - check-spectre-meltdown -- name: Calibration - {{ ansible_machine }} Specific +- name: "{{ ansible_machine }} Specific" include_tasks: "{{ ansible_machine }}.yaml" tags: - check-machine-specific - check-jitter-tool -- name: Check sync status +- name: Check Sync Status async_status: jid: "{{ spectre_meltdown_async.ansible_job_id }}" register: "spectre_meltdown_poll_results" |