Closed rauanmayemir closed 1 year ago
Converting systemd services to s6 (or s6-rc) services is difficult: the service models aren't similar, and they don't map to each other 1:1.
To give you an idea, here's the full list of systemd unit file keywords, rated with how hard it is to convert them to the s6 ecosystem.
If you need help with a particular service, the best thing would be to join the supervision mailing-list and post your unit file there, along with details of your service. We may be able to help you write an s6-rc service that does what you want.
As a general rule, notify
and forking
services cannot be converted as is, because s6 supports neither sd_notify
nor cgroups to check for forking services, but there usually are alternative ways to run services that can make use of the s6 notification mechanism (for the same effect as notify
) or that prevent daemons from forking (which alleviates the need for forking
support).
@skarnet Thank you. I realised that simply migrating a VM instance to a container with s6 might not be as trivial as I thought it would and tabled this thought for now.
Keep in mind that it's generally not a difficult task. It's just a difficult task to automate.
Can I close this?
I am trying to containerize a service that is usually run under regular linux with systemd and want to ask for an example of systemd script conversion. E.g here's the systemd service definition:
How can I properly make this into a s6-rc.d v3 service definition? I've seen oneshot and longrunning definitions, but seeing
notify
andforking
type systemd definitions, got lost wondering what to do.