aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/fluentd/templates/conf/output/00-local.conf.j22
-rw-r--r--ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j22
-rw-r--r--ansible/roles/mariadb/defaults/main.yml2
-rw-r--r--ansible/roles/octavia/templates/octavia-openrc.sh.j23
-rw-r--r--ansible/roles/service-check/tasks/main.yml4
-rw-r--r--releasenotes/notes/fix-container-healthy-checks-4ecdbe67e07819aa.yaml5
-rw-r--r--releasenotes/notes/fix-proxysql-database-internal-tls-b401e564ec39a633.yaml2
-rwxr-xr-xtests/check-failure.sh30
8 files changed, 37 insertions, 13 deletions
diff --git a/ansible/roles/fluentd/templates/conf/output/00-local.conf.j2 b/ansible/roles/fluentd/templates/conf/output/00-local.conf.j2
index dce221080..924dcc316 100644
--- a/ansible/roles/fluentd/templates/conf/output/00-local.conf.j2
+++ b/ansible/roles/fluentd/templates/conf/output/00-local.conf.j2
@@ -51,7 +51,7 @@
{% elif log_direct_to_opensearch %}
<store>
@type opensearch
- hosts {% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}
+ hosts {% if opensearch_address is defined and opensearch_address != kolla_internal_fqdn %}{{ opensearch_address }}{% else %}{% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
port {{ opensearch_port }}
scheme {{ fluentd_opensearch_scheme }}
{% if fluentd_opensearch_path != '' %}
diff --git a/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2 b/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2
index 1d814a2e6..dd5f38419 100644
--- a/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2
+++ b/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2
@@ -3,7 +3,7 @@
@type copy
<store>
@type opensearch
- hosts {% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}
+ hosts {% if opensearch_address is defined and opensearch_address != kolla_internal_fqdn %}{{ opensearch_address }}{% else %}{% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
port {{ opensearch_port }}
scheme {{ fluentd_opensearch_scheme }}
{% if fluentd_opensearch_user != '' and fluentd_opensearch_password != '' %}
diff --git a/ansible/roles/mariadb/defaults/main.yml b/ansible/roles/mariadb/defaults/main.yml
index d1023f846..8fac5f8b6 100644
--- a/ansible/roles/mariadb/defaults/main.yml
+++ b/ansible/roles/mariadb/defaults/main.yml
@@ -55,7 +55,7 @@ mariadb_extra_volumes: "{{ default_extra_volumes }}"
mariadb_enable_healthchecks: "{{ enable_container_healthchecks }}"
mariadb_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
mariadb_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
-mariadb_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
+mariadb_healthcheck_start_period: 120
mariadb_healthcheck_test:
- "CMD-SHELL"
- >-
diff --git a/ansible/roles/octavia/templates/octavia-openrc.sh.j2 b/ansible/roles/octavia/templates/octavia-openrc.sh.j2
index 9256e80a3..e915aa93f 100644
--- a/ansible/roles/octavia/templates/octavia-openrc.sh.j2
+++ b/ansible/roles/octavia/templates/octavia-openrc.sh.j2
@@ -8,3 +8,6 @@ export OS_PASSWORD='{{ octavia_keystone_password }}'
export OS_AUTH_URL='{{ keystone_internal_url }}'
export OS_INTERFACE='internal'
export OS_ENDPOINT_TYPE='internalURL'
+{% if kolla_admin_openrc_cacert is not none and kolla_admin_openrc_cacert | length > 0 %}
+export OS_CACERT='{{ kolla_admin_openrc_cacert }}'
+{% endif %}
diff --git a/ansible/roles/service-check/tasks/main.yml b/ansible/roles/service-check/tasks/main.yml
index 9f4cf30af..9cb17ad09 100644
--- a/ansible/roles/service-check/tasks/main.yml
+++ b/ansible/roles/service-check/tasks/main.yml
@@ -28,8 +28,8 @@
unhealthy_containers: >-
{{ container_facts.containers |
dict2items |
- selectattr("value.Status", "defined") |
- selectattr("value.Status", "search", "unhealthy") |
+ selectattr("value.State.Health", "defined") |
+ selectattr("value.State.Health.Status", "search", "unhealthy") |
map(attribute='key') | list }}
ansible.builtin.fail:
msg: >
diff --git a/releasenotes/notes/fix-container-healthy-checks-4ecdbe67e07819aa.yaml b/releasenotes/notes/fix-container-healthy-checks-4ecdbe67e07819aa.yaml
new file mode 100644
index 000000000..2fdba6fcf
--- /dev/null
+++ b/releasenotes/notes/fix-container-healthy-checks-4ecdbe67e07819aa.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - |
+ Fixes kolla-ansible check skip unhealthy containers.
+ `LP#2156900 <https://bugs.launchpad.net/kolla-ansible/+bug/2156900>`__
diff --git a/releasenotes/notes/fix-proxysql-database-internal-tls-b401e564ec39a633.yaml b/releasenotes/notes/fix-proxysql-database-internal-tls-b401e564ec39a633.yaml
index fb3fb9db9..238a5e583 100644
--- a/releasenotes/notes/fix-proxysql-database-internal-tls-b401e564ec39a633.yaml
+++ b/releasenotes/notes/fix-proxysql-database-internal-tls-b401e564ec39a633.yaml
@@ -6,7 +6,7 @@ fixes:
certificates (e.g. use of intermediate certificates).
Users who are affected by this bug needs to create a file
- ``proxysql-ca.pem`` at ``certificates_internal_dir``.
+ ``proxysql-ca.pem`` at ``kolla_certificates_dir``.
This file needs to be a copy of the intermediate certificate (i.e.
certificate that signed database internal TLS)
diff --git a/tests/check-failure.sh b/tests/check-failure.sh
index 19d2f071f..ecd3a10ac 100755
--- a/tests/check-failure.sh
+++ b/tests/check-failure.sh
@@ -6,13 +6,25 @@ set -o errexit
# Enable unbuffered output for Ansible in Jenkins.
export PYTHONUNBUFFERED=1
+# neutron_agents_wrappers (see ansible/roles/neutron) spawns per-namespace
+# helper containers (dnsmasq/haproxy/keepalived) that are not managed by
+# Kolla and can be created/removed by Neutron independently of the deploy,
+# e.g. neutron_dhcp_agent_dnsmasq_qdhcp-<uuid>. Ignore them in these checks.
+IGNORE_CONTAINERS_REGEX='_(qdhcp|qrouter|ovnmeta)-'
+
+filter_unmanaged_containers() {
+ grep -Ev "$IGNORE_CONTAINERS_REGEX" || true
+}
+
check_podman_failures() {
failed_containers=$(sudo podman ps -a --format "{{.Names}}" \
--filter status=created \
- --filter status=paused \
--filter status=exited \
- --filter status=unknown)
+ --filter status=paused \
+ --filter status=removing \
+ --filter status=unknown \
+ | filter_unmanaged_containers)
for container in $failed_containers; do
sudo podman inspect $container
@@ -28,7 +40,8 @@ check_podman_unhealthies() {
done
unhealthy_containers=$(sudo podman ps -a --format "{{.Names}}" \
- --filter health=unhealthy)
+ --filter health=unhealthy \
+ | filter_unmanaged_containers)
for container in $unhealthy_containers; do
echo "Discovered unhealthy container: $container"
@@ -50,10 +63,12 @@ check_docker_failures() {
# are treated as failure.
failed_containers=$(sudo docker ps -a --format "{{.Names}}" \
--filter status=created \
- --filter status=restarting \
- --filter status=paused \
--filter status=exited \
- --filter status=dead)
+ --filter status=dead \
+ --filter status=paused \
+ --filter status=removing \
+ --filter status=restarting \
+ | filter_unmanaged_containers)
for container in $failed_containers; do
sudo docker inspect $container
@@ -69,7 +84,8 @@ check_docker_unhealthies() {
done
unhealthy_containers=$(sudo docker ps -a --format "{{.Names}}" \
- --filter health=unhealthy)
+ --filter health=unhealthy \
+ | filter_unmanaged_containers)
for container in $unhealthy_containers; do
echo "Discovered unhealthy container: $container"