[Koha-devel] Switching from SysV to Systemd for koha-common service

dcook at prosentient.com.au dcook at prosentient.com.au
Wed Mar 31 00:35:22 CEST 2021


Hi Frido,

You only have 1 Koha per server? That's amazing.

I agree about using %i. With the koha-worker systemd service, we've done that.  (Bug 26363 and 27844)

I suppose the way to make a global koha-common would be to have individual systemd units for each of the individual services and then have koha-common as the parent service. I manage a different system where I control a few daemons via a parent systemd service and it works quite well. 

The only thing with that is that we'd have to re-write everything to use systemd heh. Not that I'm opposed to that, although - as Tomas noted - it would make things tougher to do in containers in the short-term. 

Sometimes, I wish that I had all the time and money to make these things happen. I am extra short on time at the moment, so no plans to work on this any time soon.

David Cook
Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899
Online: 02 8005 0595

-----Original Message-----
From: Koha-devel <koha-devel-bounces at lists.koha-community.org> On Behalf Of Fridolin SOMERS
Sent: Tuesday, 30 March 2021 7:08 PM
To: koha-devel at lists.koha-community.org
Subject: Re: [Koha-devel] Switching from SysV to Systemd for koha-common service

Hi,

Very good idea :D

We at Biblibre have build a systemd unit for Starman and Zebra, it is quite simple. But we dont use several Koha.

In ordre to implement for several Koha, I think we should use %i vars in systemd unit.
Like it is in openvpn :
https://github.com/OpenVPN/openvpn/blob/master/distro/systemd/openvpn-client%40.service.in

It allows to call any unit (for example demo Koha) :
systemctl start koha-common at demo.

About restart :
I see you can define a different kill signal than stop :
https://www.freedesktop.org/software/systemd/man/systemd.kill.html#RestartKillSignal=

But you may use "reload" action instead :
https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecReload=

We use reload for starman it is more soft (it acts like apache gracefull restart).

I attach some files here :
https://git.biblibre.com/biblibre/koha-nginx/src/branch/master/etc/systemd/system

Feel free to ask for help.

Best regards,

Le 25/03/2021 à 04:42, dcook at prosentient.com.au a écrit :
> Hi all,
> 
> I was just installing koha-common, as you do, and I noticed the 
> following warning:
> 
> Failed to enable unit: Unit
> /run/systemd/generator.late/koha-common.service is transient or generated.
> 
> This is the product of the following command: “update-rc.d koha-common 
> enable”
> 
> I think I was able to work around it by running the following: 
> “/lib/systemd/systemd-sysv-install enable koha-common”
> 
> However, I’m thinking it is probably time to switch koha-common from 
> SysV to Systemd. We’ll lose a bit of functionality for the “status”
> option, but otherwise it shouldn’t be too bad. I think we’ll lose the 
> “restart” as well as I think the systemd restart is a “stop” and “start”.
> 
> David Cook
> 
> Software Engineer
> 
> Prosentient Systems
> 
> Suite 7.03
> 
> 6a Glen St
> 
> Milsons Point NSW 2061
> 
> Australia
> 
> Office: 02 9212 0899
> 
> Online: 02 8005 0595
> 
> 
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/ git : 
> https://git.koha-community.org/ bugs : 
> https://bugs.koha-community.org/
> 

--
Fridolin SOMERS <fridolin.somers at biblibre.com> Software and system maintainer 🦄
BibLibre, France
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/




More information about the Koha-devel mailing list