Bug 1996777

Summary: logging - Update the certificates copy tasks
Product: Red Hat Enterprise Linux 9 Reporter: Noriko Hosoi <nhosoi>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Jakub Haruda <jharuda>
Severity: high Docs Contact:
Priority: high    
Version: 9.0CC: alitman, djez, jharuda, mperina, nhosoi, rhel-cs-system-management-subsystem-qe, rmeggins, spetrosi
Target Milestone: rcKeywords: Triaged
Target Release: 9.0 Beta   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:logging
Fixed In Version: rhel-system-roles-1.8.2-1.el9 Doc Type: Bug Fix
Doc Text:
Cause: In the logging role elasticsearch output, if the path of key/certs source files on the control host are configured in the playbook, even if tls is set to false, they were being copied to the managed hosts. There was a use case that the key/certs file paths are configured and do not exist under the condition of tls is false, and the case failed due to the copy source files did not exist. Fix: It is fixed so that the copying the key/certs is executed only when the tls param is set to true. Consequence: With this fix, the copy failure does not occur if tls is false.
Story Points: ---
Clone Of: 1994580 Environment:
Last Closed: 2021-12-07 21:57:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1994580    
Bug Blocks: 1978655    

Comment 1 Aviv Litman 2021-08-24 10:13:18 UTC
Verified Flows:
1. tls is false, certs+key defined: task ok, showed the warning (screenshot1, all output is green).
2. tls is false, certs+key empty: task skipped (screenshot2).
3. tls is false, certs+key undefined: task skipped (screenshot2).

I verify also with tls true to make sure the playbook behaves as expected:
4. tls is true, certs+key defined: copy task ok, and check tasks skipped.
5. tls is true, certs+key empty: copy tasks skipped and the playbook failed on the "Check certs - tls is true, but triplets are not given" task.
6. tls is true, certs+key undefined: the playbook failed on the first copy task.

The playbook behaves as expected.