Skip to content

Commit 5a1e6ba

Browse files
Merge pull request #1024 from auniyal61/nvme-cleanup-container-cleaner
Nvme cleanup container cleaner
2 parents beab13c + 6227f03 commit 5a1e6ba

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

roles/edpm_nova/meta/argument_specs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ argument_specs:
9191
edpm_nova_nvme_cleaner_command:
9292
type: str
9393
description: |
94-
Override the cleaner command. If empty, use the default:
95-
'/usr/share/openstack-nova/contrib/clean-on-delete {{ edpm_nova_nvme_cleaner_args }}'.
96-
Useful in tests (e.g. 'sleep --infinity').
94+
Base NVMe cleaner command.
95+
Defaults to '/usr/share/openstack-nova/contrib/clean-on-delete'
96+
and is concatenated with edpm_nova_nvme_cleaner_args.
97+
Override only for testing (e.g. cmd '/usr/bin/sleep' with args 'infinity').
9798
edpm_nova_nvme_cleaner_config_dest:
9899
type: str
99100
description: |

roles/edpm_nova/molecule/default/verify.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
vars:
88
test_helper_dir: "../../../../molecule/test-helpers"
99
edpm_nova_tls_ca_src_dir: /tmp/pki
10-
nvme_cleaner_template_path: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/templates/nova_nvme_cleaner_config.json.j2"
1110
edpm_nova_config_dest: /var/lib/openstack/config/nova
1211
tasks:
1312
- name: ensure expected directories exist
@@ -76,11 +75,6 @@
7675
ansible.builtin.set_fact:
7776
cleaner_cfg_json: "{{ cleaner_kolla_cfg.content | b64decode | from_json }}"
7877

79-
# auniyal: will remove it once CI is good
80-
- name: debug nvme cleaner command
81-
ansible.builtin.debug:
82-
msg: "nvme_cleaner command: {{ cleaner_cfg_json.command }}"
83-
8478
- name: Assert nvme cleaner kolla command content
8579
vars:
8680
cleaner_cmd: "{{ cleaner_cfg_json.command }}"

roles/edpm_nova/tasks/install.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,15 @@
8282
edpm_container_manage_healthcheck_disabled: true
8383
edpm_container_manage_config_patterns: 'nova_nvme_cleaner.json'
8484
edpm_container_manage_clean_orphans: false
85+
86+
- name: Remove nvme cleaner when disabled
87+
when: not edpm_nova_enable_nvme_cleaner
88+
tags:
89+
- install
90+
- nova
91+
- cleanup
92+
ansible.builtin.include_role:
93+
name: osp.edpm.edpm_container_rm
94+
vars:
95+
edpm_containers_to_rm:
96+
- nova_nvme_cleaner

0 commit comments

Comments
 (0)