Bug 901988 - portreserve systemd service claims "FAILED" during boot while /sbin/portreserve exited successfully
Summary: portreserve systemd service claims "FAILED" during boot while /sbin/portreser...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: portreserve
Version: 18
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1034139
TreeView+ depends on / blocked
 
Reported: 2013-01-20 11:11 UTC by Matthias Andree
Modified: 2014-08-15 02:49 UTC (History)
1 user (show)

Fixed In Version: portreserve-0.0.5-9.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-14 03:14:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matthias Andree 2013-01-20 11:11:41 UTC
Description of problem:
When booting up, the systemd portreserve claims failure. 
Investigating the log and configuration reveals:
- there are no ports to reserve
- /sbin/portreserve quits right away with exit status 0:

$ sudo systemctl status portreserve.service
portreserve.service - Port reservation utility
	  Loaded: loaded (/usr/lib/systemd/system/portreserve.service; enabled)
	  Active: failed (Result: resources) since Sun, 2013-01-20 11:55:14 CET; 2min 5s ago
	 Process: 513 ExecStart=/sbin/portreserve (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/portreserve.service

Jan 20 11:55:14 fed.example.org systemd[1]: Failed to start Port reservati....
Jan 20 11:55:14 fed.example.org systemd[1]: Unit portreserve.service enter...e


Version-Release number of selected component (if applicable):
portreserve-0.0.5-5.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. reboot
2. during plymouth boot animation, press [Esc] to see boot messages
  
Actual results:


Expected results:
If there are no ports to reserve and the /sbin/portreserve executable exits successfully right away, this should be logged as OK.

Additional info:

Comment 1 Tim Waugh 2013-11-27 09:03:53 UTC
This is due to a race condition between portreserve and systemd. The portreserve service has written its PID file, realised there is nothing to do, removed its PID file again and exited. Meanwhile, systemd is looking for the PID file but doesn't see it at the right time: either it misses it altogether, or it sees it when the file has been created but is empty.

A safe work-around is for portreserve to delay for a moment before exiting.

Comment 2 Fedora Update System 2013-11-27 10:04:15 UTC
portreserve-0.0.5-9.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/portreserve-0.0.5-9.fc20

Comment 3 Fedora Update System 2013-11-27 10:04:51 UTC
portreserve-0.0.5-9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/portreserve-0.0.5-9.fc19

Comment 4 Fedora Update System 2013-11-27 10:05:20 UTC
portreserve-0.0.5-9.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/portreserve-0.0.5-9.fc18

Comment 5 Fedora Update System 2013-11-27 16:11:12 UTC
Package portreserve-0.0.5-9.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing portreserve-0.0.5-9.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22275/portreserve-0.0.5-9.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-12-14 03:14:51 UTC
portreserve-0.0.5-9.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2014-08-15 02:49:21 UTC
portreserve-0.0.5-9.fc19 has been pushed to the Fedora 19 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.