RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2039107 - Add logging_restore_confs variable to restore backup
Summary: Add logging_restore_confs variable to restore backup
Keywords:
Status: CLOSED DUPLICATE of bug 2040812
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: CS System Management SST QE
URL:
Whiteboard: role:logging
Depends On: 2039106
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-11 01:15 UTC by Noriko Hosoi
Modified: 2022-01-18 20:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2039106
Environment:
Last Closed: 2022-01-18 20:47:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-107348 0 None None None 2022-01-11 01:22:04 UTC

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 ***


Note You need to log in before you can comment on or make changes to this bug.