aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2020-04-28 12:50:18 +0000
committerPeter Mikus <pmikus@cisco.com>2020-05-07 06:58:07 +0000
commitaa138e679a331e368a86f26d5f4ece03be16f3d4 (patch)
treed0169b2657a8b68db90b04a5ea77a68b2e4077c3 /resources/tools/testbed-setup/ansible
parent48cd54ff00049d58494834d25d3f0ac846ce4017 (diff)
Ansible: Pre-check tests
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I745ceb519220c4d08951dff07350f2f4709f3533
Diffstat (limited to 'resources/tools/testbed-setup/ansible')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml13
-rw-r--r--resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml50
2 files changed, 47 insertions, 16 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
index f7c37a764c..5be9fa93a5 100644
--- a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
@@ -1,6 +1,7 @@
---
# file: roles/calibration/defaults/main.yaml
+# Packages to install.
packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
packages_base:
@@ -17,6 +18,16 @@ packages_by_arch:
x86_64:
- []
+# Kernel version to check.
+kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] | join(' ') }}"
+
+kernel_version_by_distro_by_arch:
+ ubuntu:
+ x86_64:
+ - "4.15.0-72-generic"
+ aarch64:
+ - "4.15.0-54-generic"
+
pma_directory: "/tmp/pma_tools"
jitter_core: 7
-jitter_iterations: 30
+jitter_iterations: 20
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 dc789a7ec4..02a9ef3d00 100644
--- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
@@ -1,9 +1,6 @@
---
# file: roles/calibration/tasks/main.yaml
-- name: Print Ansible facts
- debug: var=ansible_facts
-
- name: Calibration - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
@@ -12,6 +9,40 @@
tags:
- install-dependencies
+- name: Calibration - 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: |
+ kernel_version not in current_kernel_version.stdout
+ tags:
+ - check-kernel-version
+
+- 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
+ tags:
+ - check-cmdline
+
- name: Calibration - Get Spectre Meltdown Checker
get_url:
url: "https://meltdown.ovh"
@@ -24,7 +55,7 @@
shell: "/opt/spectre-meltdown-checker.sh --no-color || true"
async: 60
poll: 0
- ignore_errors: yes
+ ignore_errors: true
register: spectre_meltdown_async
tags:
- check-spectre-meltdown
@@ -35,17 +66,6 @@
- check-machine-specific
- check-jitter-tool
-- name: Calibration - Get BIOS info
- shell: "dmidecode -t bios"
- ignore_errors: yes
- register: dmidecode_bios
- tags:
- - check-bios
-
-- debug: var=dmidecode_bios.stdout_lines
- tags:
- - check-bios
-
- name: Check sync status
async_status:
jid: "{{ spectre_meltdown_async.ansible_job_id }}"