Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2055117

Summary: After an IPU, sar logs are not updated anymore
Product: Red Hat Enterprise Linux 7 Reporter: Christophe Besson <cbesson>
Component: leapp-repositoryAssignee: Petr Stodulka <pstodulk>
Status: CLOSED ERRATA QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.9CC: alakatos, bwelterl, ggrimaux, mmacura, pstodulk, rmetrich
Target Milestone: rcKeywords: Reproducer, WorkAround
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: leapp-repository-0.17.0-3.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-17 15:00:24 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:

Description Christophe Besson 2022-02-16 10:27:44 UTC
Description of problem:
After running a successful leapp upgrade and rebooting on RHEL 8, sar logs are not updated anymore.

Instead of using cron, el8's sysstat relies on systemd timer, and this is considered as config files.

Standard el8:
# ll /etc/systemd/system/sysstat.service.wants
total 0
lrwxrwxrwx. 1 root root 45 Feb 16 05:14 sysstat-collect.timer -> /usr/lib/systemd/system/sysstat-collect.timer
lrwxrwxrwx. 1 root root 45 Feb 16 05:14 sysstat-summary.timer -> /usr/lib/systemd/system/sysstat-summary.timer

Upgraded to el8:
# ll /etc/systemd/system/sysstat.service.wants
ls: cannot access '/etc/systemd/system/sysstat.service.wants': No such file or directory

Version-Release number of selected component (if applicable):
leapp-0.13.0-1.el7_9.noarch
leapp-upgrade-el7toel8-0.15.0-6.el7_9.noarch


How reproducible:
Always

Steps to Reproduce:
1. Install a fresh RHEL 7.9
2. Install sysstat and enable the service
3. Run a leapp upgrade and reboot

Actual results:
Logs in /var/log/sa are not updated anymore.

Additional info:
- this issue is not specific to sysstat, see the following bug from Renaud: rhbz#2032953
- this is directly related to the following bug opened yesterday: rhbz#2054766
- the issue is easy to fix with:

# systemctl --no-reload preset sysstat.service sysstat-collect.timer sysstat-summary.timer
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.

# systemctl restart sysstat

Comment 3 Renaud Métrich 2022-02-16 11:09:34 UTC
Hello dev,

This is a global issue here, which has similar root cause than BZ #2032953.
In a nutshell, upon upgrading, leapp needs to execute "systemctl preset-all" then restore customizations made by the user (if the user disabled a service which was enabled in preset, then the service needs to be disabled in final state).

Probably some algo like the one below can be implemented:

At leapp pre-upgrade time

1. For each service, detect if its vendor state has been altered

  e.g.

  systemctl status rsyslog
  [...]
       Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; disabled; vendor preset: enabled)
  [...]

At leapp post-upgrade time

2. Execute preset-all

3. Disable/Enable customized services to match previous state

Comment 4 Petr Stodulka 2022-02-16 11:58:21 UTC
Hi Renaud. The generic solution around services is on our board, however not sure when we will be able to work on that - definitely it's not going to be part of the upcoming release - but there is high chance it will be part of the additional one. Our current plan is similar to what you described, with some other stuff around.

For this particular problem, I am adding now @alakatos as he is maintainer of rsyslog package.

Comment 5 Petr Stodulka 2022-02-16 12:00:15 UTC
Aah. Sorry for confusions. Somewhere between hell and eden I've started to thing this BZ is about rsyslog.

@alakatos: Sorry for the noise.

Comment 6 Attila Lakatos 2022-02-17 08:51:03 UTC
(In reply to Petr Stodulka from comment #5)
> Aah. Sorry for confusions. Somewhere between hell and eden I've started to
> thing this BZ is about rsyslog.
> 
> @alakatos: Sorry for the noise.

It's okay. If you think that the root cause might be coming from rsyslog, feel free to mention me/add me to the CC list.

Comment 7 Welterlen Benoit 2022-02-17 20:41:39 UTC
Hello,

The issue is that post install script are not executed (expected for a normal upgrade):
----
if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl --no-reload preset sysstat.service sysstat-collect.timer sysstat-summary.timer &>/dev/null || : 
fi
----

But it is expected that this has been executed one time, from a previous rpm install. But the previous rpm was a RHEL7 one, with this:

---
if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl preset sysstat.service >/dev/null 2>&1 || : 
fi
---

=> thus only sysstat service was managed in RHEL7 (of course, no timer, because based on crond).

Then we have only sysstat enabled, without required timer services to collect data...

Don't really know if this should be fixed in sysstat rpm (check that all service + timer are enabled) or should be checked by leapp.

Thank you !

Comment 8 Petr Stodulka 2022-02-21 13:12:48 UTC
Hi Welterlen. It can be fixed wherever maintainers prefer. It's up to them whether they prefer to fix it inside leapp-repository or their rpms.

Comment 9 Petr Stodulka 2022-11-16 15:18:35 UTC
Should be fixed by the upstream PR:
 - https://github.com/oamg/leapp-repository/pull/972

Comment 15 errata-xmlrpc 2023-05-17 15:00:24 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 (leapp and leapp-repository 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:3187

Comment 16 Lukas Bezdicka 2024-01-22 16:23:55 UTC
*** Bug 2054766 has been marked as a duplicate of this bug. ***