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 2039106 - Logging role "logging_purge_confs" option not properly working
Summary: Logging role "logging_purge_confs" option not properly working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 9.0
Assignee: Rich Megginson
QA Contact: Jakub Haruda
Gabi Fialová
URL:
Whiteboard: role:logging
: 1990971 (view as bug list)
Depends On:
Blocks: 1990985 2039107
TreeView+ depends on / blocked
 
Reported: 2022-01-11 01:09 UTC by Noriko Hosoi
Modified: 2022-05-17 13:21 UTC (History)
7 users (show)

Fixed In Version: rhel-system-roles-1.12.0-1.el9
Doc Type: Bug Fix
Doc Text:
.The `logging_purge_confs` option correctly deletes unnecessary configuration files With the `logging_purge_confs` option set to `true`, it should delete unnecessary logging configuration files. Previously, however, unnecessary configuration files were not deleted from the configuration directory even if `logging_purge_confs` was set to `true`. This issue is now fixed and the option has been redefined as follows: if `logging_purge_confs` is set to `true`, Rsyslog removes files from the `rsyslog.d` directory which do not belong to any rpm packages. This includes configuration files generated by previous runs of the Logging role. The default value of `logging_purge_confs` is `false`.
Clone Of:
: 2039107 (view as bug list)
Environment:
Last Closed: 2022-05-17 13:03:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:
gfialova: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles logging pull 264 0 None Merged Refactor logging_purge_confs and logging_restore_confs. 2022-01-18 20:49:19 UTC
Github linux-system-roles logging pull 265 0 None open make purge and reset idempotent 2022-01-21 20:11:34 UTC
Red Hat Issue Tracker RHELPLAN-107346 0 None None None 2022-01-11 01:10:50 UTC
Red Hat Product Errata RHBA-2022:2443 0 None None None 2022-05-17 13:03:28 UTC

Description Noriko Hosoi 2022-01-11 01:09:26 UTC
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 Noriko Hosoi 2022-01-18 20:51:41 UTC
Note: this bz is a rhel-9 counterpart of Bug 2040812.

Comment 2 Noriko Hosoi 2022-01-18 21:32:55 UTC
*** Bug 1990971 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2022-05-17 13:03:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: rhel-system-roles), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2443


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