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 1413284 - mcelog service is enabled after updating the package
Summary: mcelog service is enabled after updating the package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mcelog
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Prarit Bhargava
QA Contact: Andrej Manduch
URL:
Whiteboard:
: 1413285 (view as bug list)
Depends On:
Blocks: 1420851 1442258
TreeView+ depends on / blocked
 
Reported: 2017-01-14 13:37 UTC by Kenny Tordeurs
Modified: 2021-06-10 11:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 18:32:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0991 0 None None None 2018-04-10 18:33:05 UTC

Description Kenny Tordeurs 2017-01-14 13:37:22 UTC
Description of problem:
The mcelog service will change the service from disabled to enabled status after updating the package (full output in additional notes)

Version-Release number of selected component (if applicable):
https://access.redhat.com/downloads/content/rhel---7/x86_64/2456/mcelog/101-3.9de4924.el7/x86_64/fd431d51/package

How reproducible:
100%

Steps to Reproduce:
1. Install mcelog https://access.redhat.com/downloads/content/rhel---7/x86_64/2456/mcelog/101-3.9de4924.el7/x86_64/fd431d51/package
2. Disable the service, systemctl disable mcelog
3. # yum update mcelog -y
4. systemctl status mcelog

Actual results:
mcelog service is enabled after update

Expected results:
mcelog service stay disabled after update

Additional info:
The mcelog service will be reactivated during package update.

Steps to reproduce:
=============

# systemctl status mcelog
mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; disabled)
   Active: inactive (dead)

# rpm -qi mcelog
Name        : mcelog
Epoch       : 3
Version     : 101
Release     : 3.9de4924.el7
Architecture: x86_64
Install Date: Fri Jan 13 11:55:50 2017
Group       : System Environment/Base
Size        : 133633
License     : GPLv2
Signature   : RSA/SHA256, Mon Jan 12 22:12:22 2015, Key ID 199e2f91fd431d51
Source RPM  : mcelog-101-3.9de4924.el7.src.rpm
Build Date  : Thu Oct 30 14:58:41 2014
Build Host  : x86-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://github.com/andikleen/mcelog.git
Summary     : Tool to translate x86-64 CPU Machine Check Exception data
Description :
mcelog is a utility that collects and decodes Machine Check Exception data
on x86-32 and x86-64 systems. It can be run either as a daemon, or by cron.

# yum update mcelog
Resolving Dependencies
--> Running transaction check
---> Package mcelog.x86_64 3:101-3.9de4924.el7 will be updated
---> Package mcelog.x86_64 3:136-2.e4aca63.el7_3 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package            Arch          Version                       Repository                    Size
===================================================================================================
Updating:
 mcelog             x86_64        3:136-2.e4aca63.el7_3         rhel-7-server-rpms-v2         76 k

Transaction Summary
===================================================================================================
Upgrade  1 Package

Total download size: 76 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
mcelog-136-2.e4aca63.el7_3.x86_64.rpm                                             |  76 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 3:mcelog-136-2.e4aca63.el7_3.x86_64                                             1/2
  Cleanup    : 3:mcelog-101-3.9de4924.el7.x86_64                                               2/2
  Verifying  : 3:mcelog-136-2.e4aca63.el7_3.x86_64                                             1/2
  Verifying  : 3:mcelog-101-3.9de4924.el7.x86_64                                               2/2

Updated:
  mcelog.x86_64 3:136-2.e4aca63.el7_3

Complete!

# systemctl status mcelog
mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; enabled)
   Active: inactive (dead)

# rpm -qi mcelog
Name        : mcelog
Epoch       : 3
Version     : 136
Release     : 2.e4aca63.el7_3
Architecture: x86_64
Install Date: Fri Jan 13 12:19:56 2017
Group       : System Environment/Base
Size        : 181857
License     : GPLv2
Signature   : RSA/SHA256, Thu Nov 10 10:40:59 2016, Key ID 199e2f91fd431d51
Source RPM  : mcelog-136-2.e4aca63.el7_3.src.rpm
Build Date  : Mon Oct 31 12:03:38 2016
Build Host  : x86-037.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://github.com/andikleen/mcelog.git
Summary     : Tool to translate x86-64 CPU Machine Check Exception data
Description :
mcelog is a utility that collects and decodes Machine Check Exception data
on x86-32 and x86-64 systems. It can be run either as a daemon, or by cron.

Comment 2 Prarit Bhargava 2017-01-16 15:06:42 UTC
*** Bug 1413285 has been marked as a duplicate of this bug. ***

Comment 3 Prarit Bhargava 2017-01-16 15:12:09 UTC
># systemctl status mcelog
>mcelog.service - Machine Check Exception Logging Daemon
>   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; enabled)
>   Active: inactive (dead)

I don't think this means it is running, only that it has been loaded.  Can you repeat your steps and also do a 

ps aux | grep mce

before and after the mcelog update?  If that shows /usr/sbin/mcelog running then there's definitely a problem.

P.

Comment 4 Jiri Vavra 2017-01-16 16:08:05 UTC
Hi, I've tested it and it really looks like a bug

# yum install mcelog-101-3.9de4924.el7.x86_64.rpm
<...>
# systemctl disable mcelog
Removed symlink /etc/systemd/system/multi-user.target.wants/mcelog.service.
# systemctl status mcelog
● mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; disabled; vendor preset: enabled)

Then I've updated and checked systemctl and it's enabled

# yum status mcelog
<...>
# systemctl status mcelog
● mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

Checked "ps aux | grep mce" and it's not running (as stated in status) but still, it's enabled

I've rebooted the machine and it's running

# systemctl status mcelog
● mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-01-16 18:17:12 CET; 1h 19min left
<...>

(Well probably some bug with date)

Just to be sure - so I've stopped and disabled the service

# systemctl stop mcelog
# systemctl disable mcelog

Rebooted machine, and it's not running

# systemctl status mcelog
● mcelog.service - Machine Check Exception Logging Daemon
   Loaded: loaded (/usr/lib/systemd/system/mcelog.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Comment 6 Prarit Bhargava 2017-09-19 14:17:17 UTC
I suspect this has something to do with the systemd.preset directive and that it needs to be set to disabled by default.  I'll play around with the systemd files today.

P.

Comment 7 Prarit Bhargava 2017-09-19 14:37:36 UTC
Adding a systemd.preset file will "fix" this, however, I think we have a larger issue to discuss.

Since 2010, mcelog has enabled its service through %post in the rpm spec:

%post
systemctl enable mcelog.service &> /dev/null ||
systemctl daemon-reload &> /dev/null

That is within the lifetime of RHEL7 and I have concerns about changing the default behaviour at this time in RHEL7.  We would have to notify all customers of the change in the README and kbase articles explaining to them why the change was made, what the impact is to the end user, etc.

Right now our customers are used to typing "rpm -Uvh" or "yum update" and the mcelog service is enabled.  If I made this change then customers would have to additionally remember to execute "systemctl enable mcelog.service".

I don't think that is the correct thing to do.  I'm willing to revisit this for RHEL8, but I think we should keep the behavior of RHEL7 the same.

I'm closing this as WONTFIX, for obvious reasons.  I could fix it but I don't think it is the right thing to do at this stage in RHEL7.

P.

Comment 10 Michal Dekan 2017-10-03 08:40:27 UTC
(In reply to Prarit Bhargava from comment #7)
> Adding a systemd.preset file will "fix" this, however, I think we have a
> larger issue to discuss.
> 
> Since 2010, mcelog has enabled its service through %post in the rpm spec:
> 
> %post
> systemctl enable mcelog.service &> /dev/null ||
> systemctl daemon-reload &> /dev/null
> 
> That is within the lifetime of RHEL7 and I have concerns about changing the
> default behaviour at this time in RHEL7.  We would have to notify all
> customers of the change in the README and kbase articles explaining to them
> why the change was made, what the impact is to the end user, etc.
> 
> Right now our customers are used to typing "rpm -Uvh" or "yum update" and
> the mcelog service is enabled.  If I made this change then customers would
> have to additionally remember to execute "systemctl enable mcelog.service".
> 
> I don't think that is the correct thing to do.  I'm willing to revisit this
> for RHEL8, but I think we should keep the behavior of RHEL7 the same.
> 
> I'm closing this as WONTFIX, for obvious reasons.  I could fix it but I
> don't think it is the right thing to do at this stage in RHEL7.
> 
> P.

Hello,

How about this solution?

It was proposed by the customer from case 01772650.

It would not change the expected behaviour during the initial installation but it prevent the disabled state during a package update - that's what an admin expects! 

Personally I don't like such mind: Implement a workaround instead of solving the issue on the root!

Suggested update for the mcelog spec file:

	%post
	case "$1" in
	  1)
		# This is an initial installation
		systemctl enable mcelog.service &> /dev/null || systemctl daemon-reload &> /dev/null
	    ;;
	  2)
		# This is an upgrade - don't reactivate the service again
		:
	    ;;
	esac

Comment 11 Prarit Bhargava 2017-10-03 18:03:24 UTC
This seems reasonable to me.  I'll test this to make sure it works and if so I'll fix this bug.

P.

Comment 14 Andrej Manduch 2017-10-17 13:15:54 UTC
Hi Jiri,

Because bug is in modified state, it's safe to assume it will be released with RHEL 7.5.

Comment 19 errata-xmlrpc 2018-04-10 18:32:44 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, 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-2018:0991


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