[systemd-devel] SysVInit service migration to systemd

Lesley Kimmel ljkimmel99 at hotmail.com
Fri Jun 26 08:02:41 PDT 2015


Thanks for the information. I've seen that blog before. Unfortunately, it only describes a starting a service that already has a good level of integration with some of the underlying infrastructure of systemd (e.g. dbus). Let me be a little more specific about what I'm trying to accomplish and see if anyone has any thoughts on how systemd could help (or impede me).

I have a collection of servers hosting many processes such as Apache HTTPD, a database, and Java application servers. Using init these servers would: a) need to be started in a specific order and b) take a long time to start. To improve both of these scenarios I created a Python service which took an XML configuration file describing the dependencies of the various components. The Python service is started by init and forks so as to not stop the boot process. The forked process then does some basic dependency checking (including remote tests, mostly telnet or pings) before starting local services using init scripts that are not configured to be started by init.

I'm wondering, with systemd, if this Python "control" daemon would be required at all. Does systemd have the ability to check the status of remote servers? I get the impression that dbus may have this type of functionality but I've never really dug into it before. 

Lesley Kimmel, RHCE
Unix/Linux Systems Engineer

> Subject: Re: [systemd-devel] SysVInit service migration to systemd
> From: lnykryn at redhat.com
> To: ljkimmel99 at hotmail.com
> CC: systemd-devel at lists.freedesktop.org
> Date: Fri, 26 Jun 2015 15:58:35 +0200
> 
> Lesley Kimmel píše v Pá 26. 06. 2015 v 08:15 -0500:
> > Hi all;
> > 
> > I've been working with RHEL5/6 for the past several years and have
> > developed many init scripts/services which generally use lock files
> > and PID files to allow for tracking of the service status. We are
> > moving to RHEL7 (systemd) in the near future and I am looking for
> > instruction or tutorials on how to effectively migrate these scripts
> > to work with systemd. 
> 
> http://0pointer.de/blog/projects/systemd-for-admins-3.html
> 
> > 
> > I found https://wiki.archlinux.org/index.php/Systemd#Service_types
> > which seems somewhat promising but it is fairly high-level. It looks
> > like I may be able to use the 'forking' type with the 'pidfile'
> > parameter to somewhat mimic what the scripts to today. However, I have
> > a couple of questions:
> > 
> > -How does systemd track whether it should be stopping a service at
> > shutdown (analogous to the /var/lock/subsys files in SysVInit)?
> 
> Systemd tracks the services using cgroups, so it knows that the service
> is running and needs to be stopped.
> 
> > -Are there merits to using the notify or dbus types? If so does anyone
> > know of a tutorial I could use to get to that point? (FYI, I'm not a
> > developer but I learn complicated things quickly).
> > -If the current service logs to a custom, dedicated log is there a way
> > to get systemd to provide the same type of output that it does for the
> > built-in system services or must I make some modifications to
> > integrate with journald?
> 
> Look at the Administrators Blog Series and Developers Series
> https://wiki.freedesktop.org/www/Software/systemd/
> 
> > 
> > Thanks ahead of time,
> > Lesley Kimmel, RHCE
> > Linux/Unix Systems Engineer
> > 
> > _______________________________________________
> > systemd-devel mailing list
> > systemd-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 
> Regards
> Lukas
> 
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150626/ace36ed5/attachment.html>


More information about the systemd-devel mailing list