Bug 786182 - /etc/init.d/mcstrans lies about the pidfile
/etc/init.d/mcstrans lies about the pidfile
Product: Fedora
Classification: Fedora
Component: mcstrans (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
: 786567 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-01-31 11:37 EST by Michal Schmidt
Modified: 2012-02-07 02:51 EST (History)
4 users (show)

See Also:
Fixed In Version: mcstrans-0.3.2-1.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 02:51:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Schmidt 2012-01-31 11:37:08 EST
Description of problem:
/etc/init.d/mcstrans says in its header:
# pidfile: /var/run/mcstransd.pid

However, mcstrands does not seem to write a pidfile when it's started. Current systemd treats it as a failure of the service to start properly and kills the service's cgroup after a timeout of a few minutes.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. make sure you have systemd >= 37-11.fc16  (it went recently to updates)
2. systemctl start mcstrans.service
Actual results:
systemctl seems hung for a few minutes, then quit unsuccessfully. In the meantime, mcstransd is actually running, but /var/run/mcstransd.pid does not exist.

Expected results:
mcstrans should write a pidfile. Ideally it would follow the steps described in "man 7 daemon".

Additional info:
As a workaround, removing the "# pidfile:" header from the initscript helps.
See also bug 783108 where spamassassin had a similar bug.
Comment 1 Fedora Update System 2012-02-01 17:06:39 EST
mcstrans-0.3.2-1.fc16 has been submitted as an update for Fedora 16.
Comment 2 Michal Schmidt 2012-02-02 07:35:10 EST
*** Bug 786567 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Walsh 2012-02-02 08:25:40 EST
Michael, I am not sure if you are a regular user of mcstransd but I just converted it to use a unit file for F17.
Comment 4 Michal Schmidt 2012-02-02 08:39:39 EST

I used to experiment with MCS on my machine, but I don't use it anymore.

I took a look at mcstransd.service in the master branch.
I don't like Type=oneshot and RemainAfterExit=yes. mcstransd is obviously a daemon and not a oneshot script that would do some work and exit.
See what happens when you kill the daemon with a signal. The service will still appear as "active".

Please change it to Type=forking, remove RemainAfterExit and add a PIDFile=... line. Untested, but it could look like this:

Description=Mcstrans maintaining path file context


Comment 5 Fedora Update System 2012-02-02 12:28:11 EST
Package mcstrans-0.3.2-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mcstrans-0.3.2-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 6 Daniel Walsh 2012-02-02 13:27:27 EST
Fixed mcstransd.service in mcstrans-0.3.3-3.fc17
Comment 7 Fedora Update System 2012-02-07 02:51:43 EST
mcstrans-0.3.2-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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