Hi,

thanks for your reply.

On Sun, Oct 20, 2019 at 10:26 PM Peter Wiersig <pe...@friesenpeter.de>
wrote:

> 5.)
> Instead of init.d scripts create systemd units.
> https://wiki.debian.org/systemd#Creating_or_altering_services

https://freedesktop.org/wiki/Software/systemd/


So you propose not to use init.d scripts. I usually prefer a simple shell
script that is easy to test, systemd is just way to complex. But probably
for Debian you are right, if I understood correctly, newer versions do not
even support init.d / LSB anymore, so using systemd units seems to be
required there.

About your gitlab-runner.service failure:
>
> https://wiki.debian.org/systemd#Failed_units
> HINT: Extensive debugging information about systemd is on this
> FreeDesktop page. https://freedesktop.org/wiki/Software/systemd/Debugging/


I didn't find anything about init.d or DPKG_MAINTSCRIPT_PACKAGE in these
pages.
I just see that I'm supposed to reboot (!) with special parameters to debug
a shell script.

Only I found using "status", but this does not help either:

  root@node17-0:/etc/init.d# systemctl status gitlab-runner2.service
  - gitlab-runner2.service
     Loaded: not-found (Reason: No such file or directory)
     Active: inactive (dead)

funny that it does not even tell WHICH file was not found and why it was
loaded anyway.
I tried "journalctl -b > journal.txt" and found in journal.txt several
blocks like that:

  09:40:09 node17-0 systemd[1]: Started LSB: gitlab-runner.
  09:40:09 node17-0 gitlab-runner[17967]: Starting multi-runner from
/local/users/sdettmer/work/_gitlab/config.tom       l ...  builds=0
...
  09:44:08 node17-0 systemd[1]: Stopping LSB: gitlab-runner...
  09:44:08 node17-0 gitlab-runner[17967]: WARNING: Requested service stop:
terminated         builds=0
  09:44:08 node17-0 gitlab-runner[17967]: All workers stopped. Can exit now
                  builds=0
  09:44:08 node17-0 gitlab-runner[10318]: Stopping GitLab Runner:.
  09:44:08 node17-0 systemd[1]: Stopped LSB: gitlab-runner.

which does not give any hint (except that it works with
DPKG_MAINTSCRIPT_PACKAGE set).

The string "gitlab-runner2" does not appear anywhere in the whole file at
all.

Any other places where I could look?

What is in gitlab-runner.service on that one server anyways?
>

There is no such file "gitlab-runner.service" (I tried "find /etc" and
"locate").
It seem that some systemd magic applies here. Maybe, if its content is
needed for technical reasons, systemd creates some "virtual unit" on the
fly, who knows.


> Somewhen in 2016-2018 someone on debian planet posted multiple blogs of
> a great systemd introduction series, I can't find my bookmark right now
> :(
>

What a pitty, I though init.d scripts would be in support of systemd, but
apparently they are not anymore :(
So in future portable packages won't be that easy.

Steffen

Reply via email to