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 1057391

Summary: samba systemd unit file can not be managed in a high availability environment
Product: Red Hat Enterprise Linux 7 Reporter: David Vossel <dvossel>
Component: pacemakerAssignee: Andrew Beekhof <abeekhof>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: cluster-maint, dvossel, fdinitto, gdeschner
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 15:57:44 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 David Vossel 2014-01-24 01:01:53 UTC
Description of problem:

The samba systemd unit file can not consistently be managed in a HA environment.

It appears that there is a brief gap of time between running 'systemctl start smb.service' and 'systemctl status smb.service' where status will return not running.  For us to be able to manage samba with the systemd unit file in an HA environment, status must consistently indicate that the server is running immediately after 'systemctl start smb.service' exits

I can not reproduce this at the command line level, but it is fairly easy to reproduce it in my HA cluster.

Version-Release number of selected component (if applicable):
samba.x86_64                           4.1.1-13.el7

How reproducible:
75% in my cluster environment

Steps to Reproduce:
1. add samba resource to a pacemaker cluster
 pcs resource create samba systemd:smb
2. watch it fail immediately after starting because the first status check fails.

Actual results:
samba cluster resource can't start because status says it is not running.

Expected results:
samba status check should return running after samba daemon starts.

Additional info:

If I add this sleep to the smb.service file, everything works fine.
ExecPost=sleep 2 

Obviously we don't want to depend on that, but it indicates a race condition between the start and status.

Comment 2 David Vossel 2014-01-24 04:05:50 UTC
I thought adding the 'ExecStartPost=/usr/bin/sleep 2' bit to the smb.service file helped, but that does not appear to be the case.

After further investigation, it looks like the problem involves something to do with how pacemaker is executing and waiting on systemd services.

I'm moving this issue to the pacemaker component.

Comment 3 David Vossel 2014-01-24 15:57:44 UTC
This is a result of a bug in the pacemaker's systemd service execution. This bug is being tracked here. 

https://bugzilla.redhat.com/show_bug.cgi?id=1057697

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