Skip to content

Commit 0ce20fd

Browse files
seunghun1eeAlex-Welsh
authored andcommitted
Fix unrestricted copying of backend TLS certs
With the change https://review.opendev.org/c/openstack/kolla-ansible/+/915901 K-A copies backend TLS certificates to all containers of projects when backend TLS for the project is enabled because of less strict conditional check. However, this causes K-A to attempt copying non-existent certificates from hosts that is not part of backend TLS to containers that are also not part of backend TLS. This change makes service-copy-certs task check if a host is part of ``tls-backend`` group when copying backend TLS certificate and key. Cloeses-Bug: #2105505 Change-Id: I799dc6e6fdccc483784fc3c2088ada69f24412e9 Signed-off-by: Seunghun Lee <[email protected]> (cherry picked from commit e092d33)
1 parent cbc7e2c commit 0ce20fd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ansible/roles/service-cert-copy/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
become: true
2525
when:
2626
- kolla_copy_backend_tls_files | bool
27+
- inventory_hostname is in groups["tls-backend"]
2728
with_dict: "{{ project_services | select_services_enabled_and_mapped_to_host }}"
2829

2930
- name: "{{ project_name }} | Copying over backend internal TLS key"
@@ -41,4 +42,5 @@
4142
become: true
4243
when:
4344
- kolla_copy_backend_tls_files | bool
45+
- inventory_hostname is in groups["tls-backend"]
4446
with_dict: "{{ project_services | select_services_enabled_and_mapped_to_host }}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes a bug where K-A can fail service deployment because it
5+
tries to copy backend TLS certificates of some hosts to
6+
containers when both hosts and containers are not part of backend
7+
TLS and do not have certificates to copy.
8+
`LP#2105505 <https://bugs.launchpad.net/kolla-ansible/+bug/2105505>`__

0 commit comments

Comments
 (0)