Bug 2039107

Summary: Add logging_restore_confs variable to restore backup
Product: Red Hat Enterprise Linux 8 Reporter: Noriko Hosoi <nhosoi>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED DUPLICATE QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: nhosoi, rhel-cs-system-management-subsystem-qe, spetrosi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:logging
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2039106 Environment:
Last Closed: 2022-01-18 20:47:41 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: 2039106    
Bug Blocks:    

Description Noriko Hosoi 2022-01-11 01:15:21 UTC
+++ This bug was initially created as a clone of Bug #2039106 +++

Description of problem:
When "logging_purge_confs: true" is set in the playbook as [0], if the cleanup task is executed as in [1], all the config files in /etc/rsyslog.d are wiped out.

Then the cleanup task tries to restart rsyslogd to fail with the broken configuration. 

[0]- https://github.com/linux-system-roles/logging/blob/master/tests/tests_basics_files.yml#L286
[1] - https://github.com/linux-system-roles/logging/blob/master/tests/tests_basics_files.yml#L387

To avoid the broken configuration problem, the logging role generates a backup file of /etc/rsyslog.conf and files in /etc/rsyslog.d prior to running the logging role and store it in /var/lib/rsyslog.

Then, if logging_restore_confs is set to true, the configuration files in the backup file are restored in /etc.

This is useful to reset the rsyslog configration as in [1].


To verify, run TEST CASE 3 in tests_basics_files.yml.
https://github.com/linux-system-roles/logging/blob/master/tests/tests_basics_files.yml#L282

Comment 1 Rich Megginson 2022-01-18 19:42:06 UTC
@nhosoi should we mark this as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2040812 ?

Comment 2 Noriko Hosoi 2022-01-18 20:47:41 UTC
(In reply to Rich Megginson from comment #1)
> @nhosoi should we mark this as a duplicate of
> https://bugzilla.redhat.com/show_bug.cgi?id=2040812 ?

Yes, it is. Closing this and its clones...

*** This bug has been marked as a duplicate of bug 2040812 ***