diff options
| author | Zuul <zuul@review.opendev.org> | 2026-04-09 18:48:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2026-04-09 18:48:51 +0000 |
| commit | 80f6c20d13eab6024ceaa9b868104f84784e14df (patch) | |
| tree | 0f43163cfcc6f70a49512c097a5d7085031b35d0 | |
| parent | c39525322520ffb980182d271ff7a5c3c3ad62f3 (diff) | |
| parent | 894fcd5aa62b4c9c50a177194f7e2434a95b633d (diff) | |
| download | kolla-ansible-80f6c20d13eab6024ceaa9b868104f84784e14df.tar.gz kolla-ansible-80f6c20d13eab6024ceaa9b868104f84784e14df.zip | |
Merge "kolla-logs: break out from common role"
| -rw-r--r-- | ansible/inventory/all-in-one | 4 | ||||
| -rw-r--r-- | ansible/inventory/multinode | 10 | ||||
| -rw-r--r-- | ansible/roles/common/tasks/bootstrap.yml | 15 | ||||
| -rw-r--r-- | ansible/roles/logs/tasks/main.yml | 17 | ||||
| -rw-r--r-- | ansible/site.yml | 15 | ||||
| -rw-r--r-- | releasenotes/notes/kolla-logs-rename-13892296d83a41f5.yaml | 5 | ||||
| -rw-r--r-- | tests/templates/inventory.j2 | 10 |
7 files changed, 55 insertions, 21 deletions
diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index 5fa8ba959..1eccb5310 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -175,10 +175,10 @@ common [fluentd:children] common -[kolla-logs:children] +[kolla-toolbox:children] common -[kolla-toolbox:children] +[kolla_logs:children] common [opensearch:children] diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index 4aaec0785..9c87a2015 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -193,12 +193,16 @@ common [fluentd:children] common -[kolla-logs:children] -common - [kolla-toolbox:children] common +[kolla_logs:children] +control +network +compute +storage +monitoring + [opensearch:children] control diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml index 8224ced75..ed97d539c 100644 --- a/ansible/roles/common/tasks/bootstrap.yml +++ b/ansible/roles/common/tasks/bootstrap.yml @@ -1,16 +1 @@ --- -- name: Creating log volume - become: true - kolla_container: - action: "create_volume" - common_options: "{{ docker_common_options }}" - name: "kolla_logs" - when: inventory_hostname in groups['kolla-logs'] - -- name: Link kolla_logs volume to /var/log/kolla - become: true - ansible.builtin.file: - src: "{{ container_engine_volumes_path }}/kolla_logs/_data" - path: /var/log/kolla - state: link - when: inventory_hostname in groups['kolla-logs'] diff --git a/ansible/roles/logs/tasks/main.yml b/ansible/roles/logs/tasks/main.yml new file mode 100644 index 000000000..3ebc0fc44 --- /dev/null +++ b/ansible/roles/logs/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- name: Ensure /var/log/kolla exists + when: kolla_action in ['deploy', 'reconfigure'] + block: + - name: Ensure log volume exists + become: true + kolla_container: + action: "create_volume" + common_options: "{{ docker_common_options }}" + name: "kolla_logs" + + - name: Ensure kolla_logs volume link to /var/log/kolla exists + become: true + ansible.builtin.file: + src: "{{ container_engine_volumes_path }}/kolla_logs/_data" + path: /var/log/kolla + state: link diff --git a/ansible/site.yml b/ansible/site.yml index abc31d580..08a072ccf 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -83,10 +83,23 @@ roles: - role: prechecks +- name: Apply role logs + gather_facts: false + hosts: kolla_logs + serial: '{{ kolla_serial|default("0") }}' + max_fail_percentage: >- + {{ logs_max_fail_percentage | + default(kolla_max_fail_percentage) | + default(100) }} + tags: + - common + - logs + roles: + - logs + - name: Apply role common gather_facts: false hosts: - - kolla-logs - kolla-toolbox serial: '{{ kolla_serial|default("0") }}' max_fail_percentage: >- diff --git a/releasenotes/notes/kolla-logs-rename-13892296d83a41f5.yaml b/releasenotes/notes/kolla-logs-rename-13892296d83a41f5.yaml new file mode 100644 index 000000000..52b70fcbc --- /dev/null +++ b/releasenotes/notes/kolla-logs-rename-13892296d83a41f5.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + ``kolla_logs`` role has been split from ``common`` role, please update + your inventory accordingly to include ``kolla_logs`` group. diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index e9172ecfa..1e2833298 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -251,12 +251,22 @@ common [fluentd:children] common +{# TODO(mnasiadka) Remove in 2027.2 (after next SLURP) #} +{% if is_upgrade | bool %} [kolla-logs:children] common +{% endif %} [kolla-toolbox:children] common +[kolla_logs:children] +control +network +compute +storage +monitoring + [opensearch:children] control |
