Bug 1292762 - (RHEL7) S30Samba scripts do not work on systemd systems
(RHEL7) S30Samba scripts do not work on systemd systems
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: samba (Show other bugs)
3.1
Unspecified Unspecified
medium Severity medium
: ---
: RHGS 3.1.2
Assigned To: Michael Adam
Vivek Das
: Triaged, ZStream
Depends On: 1290604 1292755
Blocks: 1292773
  Show dependency treegraph
 
Reported: 2015-12-18 04:58 EST by Michael Adam
Modified: 2016-03-01 01:14 EST (History)
6 users (show)

See Also:
Fixed In Version: glusterfs-3.7.5-13
Doc Type: Bug Fix
Doc Text:
Cause: The Samba hook scripts were explicitly calling SysV-init scripts for Samba /etc/init.d/smb . Consequence: The scripts do not work as expected on systemd systems. The fail to restart or reload Samba when required. Fix: The scripts now use the service command which works both on SysV and systemd systems. Result: The scripts work as expected on SysV and systemd systems.
Story Points: ---
Clone Of: 1292755
: 1292773 (view as bug list)
Environment:
Last Closed: 2016-03-01 01:14:10 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 Michael Adam 2015-12-18 04:58:31 EST
+++ This bug was initially created as a clone of Bug #1292755 +++

+++ This bug was initially created as a clone of Bug #1290604 +++

Description of problem:

S30Samba hook scripts use /etc/init.d/smb .
But /etc/init.d/smb does not exist on systemd systems.
Using "service smb <COMMAND>" is the portable way.
It calls init scripts on sysv systems, and redirects
to systemctl on systemd systems.


Actual results:

scripts do not (re)start samba

Expected results:

scripts (re)start samba

--- Additional comment from Vijay Bellur on 2015-12-10 18:42:24 EST ---

REVIEW: http://review.gluster.org/12945 (hook-scripts: fix S30Samba scripts on systemd systems) posted (#1) for review on master by Michael Adam (obnox@samba.org)

--- Additional comment from Vijay Bellur on 2015-12-17 07:11:40 EST ---

COMMIT: http://review.gluster.org/12945 committed in master by Niels de Vos (ndevos@redhat.com) 
------
commit ce3ff7e328483dffdae6ae2914924bc2380db67e
Author: Michael Adam <obnox@samba.org>
Date:   Fri Dec 11 00:37:13 2015 +0100

    hook-scripts: fix S30Samba scripts on systemd systems
    
    /etc/init.d/smb does not exist on systemd systems.
    Using "service smb <COMMAND>" is the portable way.
    It calls init scripts on sysv systems, and redirects
    to systemctl on systemd systems.
    
    Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615
    BUG: 1290604
    Signed-off-by: Michael Adam <obnox@samba.org>
    Reviewed-on: http://review.gluster.org/12945
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Anoop C S <anoopcs@redhat.com>
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>

--- Additional comment from Vijay Bellur on 2015-12-18 04:51:07 EST ---

REVIEW: http://review.gluster.org/13000 (hook-scripts: fix S30Samba scripts on systemd systems) posted (#1) for review on release-3.7 by Michael Adam (obnox@samba.org)
Comment 3 rjoseph 2015-12-19 00:22:54 EST
Upstream Master: http://review.gluster.org/12945 
Upstream Release 3.7: http://review.gluster.org/13000
Downstream : https://code.engineering.redhat.com/gerrit/#/c/64209/
Comment 5 surabhi 2015-12-29 06:13:50 EST
Please add fixed in Version.
Comment 6 Vivek Das 2015-12-30 06:22:33 EST
Ran this test and verified hook-scripts fix S30Samba scripts on systemd systems.
Did a service smb condrestart and it does start the smb service successfully.

Versions:
glusterfs-cli-3.7.5-13.el7rhgs.x86_64
samba-client-4.2.4-12.el7rhgs.x86_64
Comment 8 errata-xmlrpc 2016-03-01 01:14:10 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-2016-0192.html

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