Bug 1247123 - unable to start service based on init.d after package installation
unable to start service based on init.d after package installation
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts (Show other bugs)
7.1
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: initscripts Maintenance Team
Jan Ščotka
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-27 07:50 EDT by Karel Srot
Modified: 2016-11-25 08:01 EST (History)
8 users (show)

See Also:
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 06:24:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2015-07-27 07:50:07 EDT
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 06:20:48 EDT
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 06:24:13 EST
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

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