this bug tracks the progress of adding 'koha-common.service' as a systemd service
Created attachment 149060 [details] [review] Bug 33371: Add 'koha-common.service' systemd service to test - install current package - note following $message on install 'Failed to enable unit: Unit /run/systemd/generator.late/koha-common.service is transient or generated.' - apply patch, build package, install new package - note $message is gone! :) - test koha-common.service # systemctl start koha-common # systemctl status koha-common | grep running Active: active (running) since Sun 2023-04-02 00:27:31 NZDT <<< # systemctl stop koha-common # systemctl status koha-common | grep dead Active: inactive (dead) since Sun 2023-04-02 00:25:34 NZDT <<<
Created attachment 151474 [details] [review] Bug 33371: Add 'koha-common.service' systemd service to test - install current package - note following $message on install 'Failed to enable unit: Unit /run/systemd/generator.late/koha-common.service is transient or generated.' - apply patch, build package, install new package - note $message is gone! :) - test koha-common.service # systemctl start koha-common # systemctl status koha-common | grep running Active: active (running) since Sun 2023-04-02 00:27:31 NZDT <<< # systemctl stop koha-common # systemctl status koha-common | grep dead Active: inactive (dead) since Sun 2023-04-02 00:25:34 NZDT <<< Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.05. Nice work everyone, thanks!
I don't know about this one... It feels hacky and yet it should work. On one hand, it would be nice to convert from the SysV init script to a Systemd unit. On the other hand, Systemd doesn't work well for containers. Maybe we should have a script or scripts that are called by either the SysV init, Systemd, or whatever management program we choose. That's for the future though I think...
PROBLEM! On my Ubuntu 20.04 LTS it doesnt comes up after REBOOT (!!!). So I need manually run "service koha-common start". AFTER REBOOT: #> service koha-common status ● koha-common.service - Start required services for each Koha instance Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) Active: inactive (dead) I found that on my server koha-common.service lacks for [Install] WantedBy=multi-user.target without this, it dies: #> systemctl enable koha-common ``` Synchronizing state of koha-common.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable koha-common The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl. ``` and with "Install" block it now ok: #> systemctl enable koha-common ``` Synchronizing state of koha-common.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable koha-common Created symlink /etc/systemd/system/multi-user.target.wants/koha-common.service → /lib/systemd/system/koha-common.service. ``` And on reboot now I have it ALIVE! #> service koha-common status ● koha-common.service - Start required services for each Koha instance Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-06-01 05:15:09 EEST; 14s ago
Created attachment 151927 [details] [review] Bug 33371: Add [Install] section to koha-common.service to test: 1/ install pkg, reboot, note service is not 'active' 2/ add patch, build package 3/ install pkg, reboot, note service is 'active' :) root@deb11:/etc# systemctl status koha-common * koha-common.service - Start required services for each Koha instance Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<< Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago Tasks: 0 (limit: 2244) Memory: 0B CPU: 0 CGroup: /system.slice/koha-common.service Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance...
Created attachment 151929 [details] [review] [PATCH] Bug 33371: Add [Install] section to koha-common.service to test: 1/ install pkg, reboot, note service is not 'active' 2/ add patch, build package 3/ install pkg, reboot, note service is 'active' :) root@deb11:/etc# systemctl status koha-common * koha-common.service - Start required services for each Koha instance Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<< Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago Tasks: 0 (limit: 2244) Memory: 0B CPU: 0 CGroup: /system.slice/koha-common.service Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance... Signed-off-by: Andrew Nugged <nugged@gmail.com>
Created attachment 151930 [details] [review] Bug 33371: Add [Install] section to koha-common.service to test: 1/ install pkg, reboot, note service is not 'active' 2/ add patch, build package 3/ install pkg, reboot, note service is 'active' :) root@deb11:/etc# systemctl status koha-common * koha-common.service - Start required services for each Koha instance Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<< Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago Tasks: 0 (limit: 2244) Memory: 0B CPU: 0 CGroup: /system.slice/koha-common.service Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance... Signed-off-by: Andrew Nugged <nugged@gmail.com>
Nice work everyone! Pushed to stable for 22.11.x