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 1247123

Summary: unable to start service based on init.d after package installation
Product: Red Hat Enterprise Linux 7 Reporter: Karel Srot <ksrot>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: Jan Ščotka <jscotka>
Severity: medium Docs Contact:
Priority: high    
Version: 7.1CC: bblaskov, jbastian, jscotka, lnykryn, mpetlan, ovasik, systemd-maint-list, systemd-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: initscripts-9.49.28-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1362225 (view as bug list) Environment:
Last Closed: 2015-11-19 11:24:13 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 Karel Srot 2015-07-27 11:50:07 UTC
Description of problem:

After installing a package that provides an init.d file I am unable to start the service until I run systemctl daemon-reload.

Previous version worked, the execution of deamon-reload was only recommended.

systemd-208-20.el7_1.5.x86_64:

# service bz552279d status
bz552279d.service - LSB: start and stop bz552279d daemon
   Loaded: loaded (/etc/rc.d/init.d/bz552279d)
   Active: inactive (dead) since Mon 2015-07-27 05:13:20 EDT; 44s ago
  Process: 18147 ExecStop=/etc/rc.d/init.d/bz552279d stop (code=exited, status=0/SUCCESS)
  Process: 18052 ExecStart=/etc/rc.d/init.d/bz552279d start (code=exited, status=0/SUCCESS)
 Main PID: 18056 (code=killed, signal=TERM)
   CGroup: /system.slice/bz552279d.service
 
Jul 27 05:13:09 mytesthost systemd[1]: Starting LSB: start and stop bz552279d daemon...
Jul 27 05:13:09 mytesthost bz552279d[18052]: Starting bz552279d: [  OK  ]
Jul 27 05:13:09 mytesthost systemd[1]: Started LSB: start and stop bz552279d daemon.
Jul 27 05:13:20 mytesthost systemd[1]: Stopping LSB: start and stop bz552279d daemon...
Jul 27 05:13:20 mytesthost bz552279d[18147]: Stopping bz552279d: [  OK  ]
Jul 27 05:13:20 mytesthost systemd[1]: Stopped LSB: start and stop bz552279d daemon.
 
Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
[0 root@qeos-11 test]#
[0 root@qeos-11 test]# service bz552279d start
Starting bz552279d (via systemctl):  Warning: Unit file of bz552279d.service changed on disk, 'systemctl daemon-reload' recommended.
                                                           [  OK  ]


while with systemd-219-8.el7.x86_64:


[root@x86-64-v01 ~]# service bz552279d status
● bz552279d.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
 
Jul 27 10:17:46 mytesthost bz552279d[12664]: Starting bz552279d: [  OK  ]
Jul 27 10:17:46 mytesthost systemd[1]: Started LSB: start and stop bz552279d daemon.
Jul 27 10:17:54 mytesthost systemd[1]: Stopping LSB: start and stop bz552279d daemon...
Jul 27 10:17:54 mytesthost bz552279d[12793]: Stopping bz552279d: [  OK  ]
Jul 27 10:17:54 mytesthost systemd[1]: Starting LSB: start and stop bz552279d daemon...
Jul 27 10:17:54 mytesthost bz552279d[12798]: Starting bz552279d: [  OK  ]
Jul 27 10:17:54 mytesthost systemd[1]: Started LSB: start and stop bz552279d daemon.
Jul 27 10:18:06 mytesthost systemd[1]: Stopping LSB: start and stop bz552279d daemon...
Jul 27 10:18:06 mytesthost bz552279d[12992]: Stopping bz552279d: [  OK  ]
Jul 27 10:18:06 mytesthost systemd[1]: Stopped LSB: start and stop bz552279d daemon.
[root@x86-64-v01 ~]# service bz552279d start
Starting bz552279d (via systemctl):  Failed to start bz552279d.service: Unit bz552279d.service failed to load: No such file or directory.
[FAILED]
[root@x86-64-v01 ~]#
[root@x86-64-v01 ~]# systemctl daemon-reload
[root@x86-64-v01 ~]# service bz552279d status
● bz552279d.service - LSB: start and stop bz552279d daemon
   Loaded: loaded (/etc/rc.d/init.d/bz552279d)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
 
Jul 27 10:17:46 mytesthost bz552279d[12664]: Starting bz552279d: [  OK  ]
Jul 27 10:17:46 mytesthost systemd[1]: Started LSB: start and stop bz552279d daemon.
Jul 27 10:17:54 mytesthost systemd[1]: Stopping LSB: start and stop bz552279d daemon...
Jul 27 10:17:54 mytesthost bz552279d[12793]: Stopping bz552279d: [  OK  ]
Jul 27 10:17:54 mytesthost systemd[1]: Starting LSB: start and stop bz552279d daemon...
Jul 27 10:17:54 mytesthost bz552279d[12798]: Starting bz552279d: [  OK  ]
Jul 27 10:17:54 mytesthost systemd[1]: Started LSB: start and stop bz552279d daemon.
Jul 27 10:18:06 mytesthost systemd[1]: Stopping LSB: start and stop bz552279d daemon...
Jul 27 10:18:06 mytesthost bz552279d[12992]: Stopping bz552279d: [  OK  ]
Jul 27 10:18:06 mytesthost systemd[1]: Stopped LSB: start and stop bz552279d daemon.
[root@x86-64-v01 ~]# service bz552279d start
Starting bz552279d (via systemctl):  [  OK  ]

Comment 5 Lukáš Nykrýn 2015-08-26 10:20:48 UTC
This is not working anymore because systemd does not support initscripts directly. Now it has a generator which generates unit-files, but it is only run during startup and daemon-reload.

I propose that we should keep the behavior as is and add a workaround to service command and in initscripts functions. They could detect that init.d directory was changed and reload systemd. Only downside is that you will still need to call deamon-reload before systemctl start, but that should not be a problem, because if third-party ships an initscript, it will use the old commands not systemctl.

Comment 10 errata-xmlrpc 2015-11-19 11:24:13 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://rhn.redhat.com/errata/RHBA-2015-2134.html