Skip to content

Commit 067da49

Browse files
Merge pull request openstack-k8s-operators#641 from gibizer/pre-adoption-tuned
[pre-adoption-validation]Check tuned profile
2 parents 2dd5901 + fc8e240 commit 067da49

File tree

21 files changed

+342
-2
lines changed

21 files changed

+342
-2
lines changed

roles/edpm_pre_adoption_validation/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ edpm_pre_adoption_validation_old_neutron_config: /var/lib/config-data/puppet-gen
2121

2222
edpm_pre_adoption_validation_hostname_enabled: true
2323
edpm_pre_adoption_validation_kernel_args_enabled: true
24+
edpm_pre_adoption_validation_tuned_enabled: true

roles/edpm_pre_adoption_validation/meta/argument_specs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ argument_specs:
2020
type: bool
2121
default: true
2222
description: Whether the kernel argument checks are executed.
23+
edpm_pre_adoption_validation_tuned_enabled:
24+
type: bool
25+
default: true
26+
description: Whether the tuned profile checks are executed.

roles/edpm_pre_adoption_validation/molecule/hostname-adoption-negative/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ provisioner:
1717
inventory:
1818
hosts:
1919
all:
20+
vars:
21+
edpm_pre_adoption_validation_tuned_enabled: false
2022
hosts:
2123
edpm-0:
2224
canonical_hostname: edpm-0.localdomain

roles/edpm_pre_adoption_validation/molecule/hostname-adoption-positive/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ provisioner:
1717
inventory:
1818
hosts:
1919
all:
20+
vars:
21+
edpm_pre_adoption_validation_tuned_enabled: false
2022
hosts:
2123
edpm-0:
2224
canonical_hostname: edpm-0.localdomain

roles/edpm_pre_adoption_validation/molecule/hostname-greenfield/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ provisioner:
1717
inventory:
1818
hosts:
1919
all:
20+
vars:
21+
edpm_pre_adoption_validation_tuned_enabled: false
2022
hosts:
2123
edpm-0:
2224
canonical_hostname: edpm-0.localdomain

roles/edpm_pre_adoption_validation/molecule/kernel-args-existing-args/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provisioner:
1919
all:
2020
vars:
2121
edpm_pre_adoption_validation_hostname_enabled: false
22+
edpm_pre_adoption_validation_tuned_enabled: false
2223
# this is a kernel arg that by default defined in the test env
2324
# we use this to simulate that what is requested during adoption
2425
# is already configured

roles/edpm_pre_adoption_validation/molecule/kernel-args-new-args/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provisioner:
1919
all:
2020
vars:
2121
edpm_pre_adoption_validation_hostname_enabled: false
22+
edpm_pre_adoption_validation_tuned_enabled: false
2223
# this is a kernel arg isn't defined in the test env therefore
2324
# we can use it for a negative scenario where the check fails
2425
edpm_kernel_args: "test=1"

roles/edpm_pre_adoption_validation/molecule/kernel-args-new-hugepages/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provisioner:
1919
all:
2020
vars:
2121
edpm_pre_adoption_validation_hostname_enabled: false
22+
edpm_pre_adoption_validation_tuned_enabled: false
2223
# This is already configured in the test env so this alone would be
2324
# OK
2425
edpm_kernel_args: "console=ttyS0"

roles/edpm_pre_adoption_validation/molecule/kernel-args-no-args/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provisioner:
1919
all:
2020
vars:
2121
edpm_pre_adoption_validation_hostname_enabled: false
22+
edpm_pre_adoption_validation_tuned_enabled: false
2223
# as no extra kernel args is requested the check will always succeed
2324
# edpm_kernel_args: ""
2425
hosts:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
tasks:
5+
- name: Converge
6+
block:
7+
- name: "Include role"
8+
ansible.builtin.include_role:
9+
name: osp.edpm.edpm_pre_adoption_validation
10+
11+
- name: "Check execution halted"
12+
ansible.builtin.fail:
13+
msg: "Execution should stop before this task"
14+
register: should_not_run
15+
rescue:
16+
- name: Asset that role failed
17+
ansible.builtin.assert:
18+
that:
19+
- should_not_run is not defined

0 commit comments

Comments
 (0)