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 1478335 - rhel-dmesg service always enabled even after systemctl disable rhel-dmesg.service
Summary: rhel-dmesg service always enabled even after systemctl disable rhel-dmesg.ser...
Keywords:
Status: CLOSED DUPLICATE of bug 1395391
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-04 10:54 UTC by masanari iida
Modified: 2017-08-23 15:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 15:10:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description masanari iida 2017-08-04 10:54:39 UTC
Description of problem:
rhel-dmesg service always enabled even after systemctl disable 
rhel-dmesg.service

[root@kc0005 basic.target.wants]# systemctl status rhel-dmesg.service
* rhel-dmesg.service - Dump dmesg to /var/log/dmesg
   Loaded: loaded (/usr/lib/systemd/system/rhel-dmesg.service; disabled; vendor preset: disabled) <== disabled status
   Active: active (exited) since Thu 2017-08-03 10:33:01 JST; 1 day 9h ago
  Process: 1034 ExecStart=/usr/lib/systemd/rhel-dmesg (code=exited, status=0/SUCCESS)
 Main PID: 1034 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/rhel-dmesg.service

Version-Release number of selected component (if applicable):
initscripts-9.49.37-1.el7_3.1.x86_64

How reproducible:
Always

Steps to Reproduce:
1. systemctl disable rhel-dmesg.service 
2. Reboot the system

Actual results:
rhel-dmesg.service always started. And generate dmesg log under /var/log.

Expected result.
One can enable/disable rhel-dmesg.service using systemctl.

Additional info:
My understanding is that this symptom happen because
the initscripts RPM install symlink when the RPM install files.
But it is not the way how to "enable" the unit by default with systemd.

man systemd.preset

DESCRIPTION
       Preset files may be used to encode policy which units shall be enabled
       by default and which ones shall be disabled. 

I think the initscript packager should make use of this method.

Workaround:
Remove symlink under /usr/lib/systemd/system/basic.target.wants
And systemctl enable rhel-dmesg, then the system writes dmesg in /var/log.
And systemctl disable rhel-dmesg, then the system stop output dmesg in /var/log.

Background:
One customer asked HPE that why rhel-dmesg output the logs even it
has "disabled" status.
The I troubleshoot and found the reason.

I know that current method (provide the symlink by initscript RPM) 
does the job.
But I think it doesn't follow the rule under systemd.
That's why the customer could not stop the service.

Severity: low

Comment 2 David Kaspar // Dee'Kej 2017-08-23 15:10:16 UTC
Hello Masanari,

I'm closing this as a duplicate. If needed, please follow up in the former BZ.

Best regards,

David

*** This bug has been marked as a duplicate of bug 1395391 ***


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