add support for services that fork themselves
Bug #1490574 reported by
Ricardo Kirkner
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Fix Released
|
Critical
|
Unassigned | ||
15.04 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
While writing a snappy package, I found an issue where systemd would not start the service defined in my snap package properly.
Upon closer inspection of the issue (thanks mvo!) we found that the problem was that the application itself was already forking to become a daamon, which requires the unit file to indicate this by adding Type=forking to the Service description.
After adding that stanza manually, the service started properly via systemd.
Please add support to snappy to specify that the service handles forking itself, thus causing the systemd unit file to have a Type=forking in the Service section.
Related branches
lp:~mvo/snappy/snappy-lp1490574-systemd-type-forking
- Michael Vogt (community): Approve
- John Lenton (community): Approve
-
Diff: 104 lines (+34/-7)5 files modifieddocs/meta.md (+3/-1)
snappy/click.go (+1/-0)
snappy/click_test.go (+25/-4)
snappy/snapp.go (+1/-0)
systemd/systemd.go (+4/-2)
Changed in snappy: | |
status: | New → Triaged |
importance: | Undecided → Critical |
summary: |
- add support for raw systemd unit files + add support for services that fork themselves |
description: | updated |
To post a comment you must log in.
Please do not allow shipping a custom systemd unit file. The unit file specification is extremely rich and this would create a number of problems for reviews, possibly unintended interactions with the system and potential security problems. We should continue along the path of autogenerating this files from the app yaml (ie, in this case, add something to the yaml that will give you 'Type=forking').