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 2160770 - logwatch is not handling systemd "Deactivated" messages properly
Summary: logwatch is not handling systemd "Deactivated" messages properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: logwatch
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimovec
QA Contact: Karel Volný
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-13 16:14 UTC by Jonathan Kamens
Modified: 2023-11-07 08:58 UTC (History)
3 users (show)

Fixed In Version: logwatch-7.5.5-6.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:23:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-145076 0 None None None 2023-01-13 16:16:57 UTC
Red Hat Product Errata RHBA-2023:6319 0 None None None 2023-11-07 08:23:38 UTC

Description Jonathan Kamens 2023-01-13 16:14:57 UTC
There are two issues here:

1. /usr/share/logwatch/scripts/services/systemd is coded to ignore all lines that match /^Deactivated /, but then elsewhere in the script it has logic attempting to report stuff about those lines, even though they're being ignored. I think ignoring them is the right call since they're so ubiquitous and the obsolete code should be removed from the script.

2) The format of the logging has changed in RHEL9 and the pattern being used now to ignore those lines is no longer working. I think the pattern should probably be changed to /: Deactivated /.

Comment 1 Karel Volný 2023-04-28 14:17:08 UTC
(In reply to Jonathan Kamens from comment #0)
> 1. /usr/share/logwatch/scripts/services/systemd is coded to ignore all lines
> that match /^Deactivated /, but then elsewhere in the script it has logic
> attempting to report stuff about those lines, even though they're being
> ignored. I think ignoring them is the right call since they're so ubiquitous
> and the obsolete code should be removed from the script.

do I read this correctly that this is just a matter of code review, no processing behaviour that can be observed?

> 2) The format of the logging has changed in RHEL9 and the pattern being used
> now to ignore those lines is no longer working. I think the pattern should
> probably be changed to /: Deactivated /.

I have troubles reproducing this ...

there's plenty of Deactivated messages

# grep Deactivated /var/log/messages 
Apr 28 09:45:55 localhost systemd[1]: initrd-parse-etc.service: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: dbus.socket: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: dracut-pre-pivot.service: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: systemd-ask-password-console.path: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: dracut-pre-mount.service: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: dracut-initqueue.service: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: systemd-sysctl.service: Deactivated successfully.
Apr 28 09:45:55 localhost systemd[1]: systemd-tmpfiles-setup.service: Deactivated successfully.
...

but nothing in logwatch output ( logwatch --service systemd --range all | grep Deactivated ), so it seems these are ignored properly as of logwatch-7.5.5-6.el9.noarch ?

Comment 2 Jonathan Kamens 2023-05-02 12:02:12 UTC
Someone already fixed this, and even noted this ticket number in the RPM changelog entry:

* Fri Apr 14 2023 Pavel Šimovec <psimovec> - 7.5.5-6
- Add patch to fix systemd messages containing "Deactivated"
- Resolves: rhbz:2160770

I don't know why they didn't update the ticket.

Comment 3 Karel Volný 2023-05-03 11:33:19 UTC
(In reply to Jonathan Kamens from comment #2)
> Someone already fixed this, and even noted this ticket number in the RPM
> changelog entry:

thanks, my bad, I've totally missed this as the updated package shouldn't have been available yet (so I hadn't expected the fix to be included in the RHEL version I've worked with)

> I don't know why they didn't update the ticket.

the state transition from ASSIGNED to MODIFIED means that the fix had been commited, so yes, it got updated properly by Pavel, the rest is (broken?) automation

Comment 8 errata-xmlrpc 2023-11-07 08:23:35 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 (logwatch bug fix and enhancement update), 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-2023:6319


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