Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[le12] systemd: fix non-working service aliases #9620

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

dtechsrv
Copy link
Contributor

This PR fixes issue #9618.

RPi4:~ # systemctl status service.system.docker | cat
● service.system.docker.service - Docker Application Container Engine
     Loaded: loaded (/storage/.config/system.d/service.system.docker.service; enabled; preset: disabled)
     Active: active (running) since Fri 2024-12-27 17:40:34 CET; 13s ago
       Docs: https://docs.docker.com
    Process: 1799 ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config (code=exited, status=0/SUCCESS)
   Main PID: 1802 (dockerd)
      Tasks: 20 (limit: 8192)
        CPU: 910ms
     CGroup: /system.slice/service.system.docker.service
             ├─1802 /storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd --log-driver=journald --group=root --data-root=/storage/.kodi/userdata/addon_data/service.system.docker/docker --storage-driver=overlay2
             └─1811 containerd --config /var/run/docker/containerd/containerd.toml

Dec 27 17:40:33 RPi4 dockerd[1802]: time="2024-12-27T17:40:33.293388037+01:00" level=info msg="[graphdriver] trying configured driver: overlay2"
Dec 27 17:40:33 RPi4 dockerd[1802]: time="2024-12-27T17:40:33.852644722+01:00" level=info msg="Loading containers: start."
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.279376342+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.449219707+01:00" level=info msg="Loading containers: done."
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545590497+01:00" level=warning msg="WARNING: No memory limit support"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545668143+01:00" level=warning msg="WARNING: No swap limit support"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545723605+01:00" level=info msg="Docker daemon" commit=f9522e5e96c3ab5a6b8a643d15a92700ca864da6 containerd-snapshotter=false storage-driver=overlay2 version=27.1.2
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545864824+01:00" level=info msg="Daemon has completed initialization"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.602456292+01:00" level=info msg="API listen on /var/run/docker.sock"
Dec 27 17:40:34 RPi4 systemd[1]: Started service.system.docker.service.
RPi4:~ # systemctl status docker | cat
● service.system.docker.service - Docker Application Container Engine
     Loaded: loaded (/storage/.config/system.d/service.system.docker.service; enabled; preset: disabled)
     Active: active (running) since Fri 2024-12-27 17:40:34 CET; 18s ago
       Docs: https://docs.docker.com
    Process: 1799 ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config (code=exited, status=0/SUCCESS)
   Main PID: 1802 (dockerd)
      Tasks: 20 (limit: 8192)
        CPU: 913ms
     CGroup: /system.slice/service.system.docker.service
             ├─1802 /storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd --log-driver=journald --group=root --data-root=/storage/.kodi/userdata/addon_data/service.system.docker/docker --storage-driver=overlay2
             └─1811 containerd --config /var/run/docker/containerd/containerd.toml

Dec 27 17:40:33 RPi4 dockerd[1802]: time="2024-12-27T17:40:33.293388037+01:00" level=info msg="[graphdriver] trying configured driver: overlay2"
Dec 27 17:40:33 RPi4 dockerd[1802]: time="2024-12-27T17:40:33.852644722+01:00" level=info msg="Loading containers: start."
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.279376342+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.449219707+01:00" level=info msg="Loading containers: done."
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545590497+01:00" level=warning msg="WARNING: No memory limit support"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545668143+01:00" level=warning msg="WARNING: No swap limit support"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545723605+01:00" level=info msg="Docker daemon" commit=f9522e5e96c3ab5a6b8a643d15a92700ca864da6 containerd-snapshotter=false storage-driver=overlay2 version=27.1.2
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.545864824+01:00" level=info msg="Daemon has completed initialization"
Dec 27 17:40:34 RPi4 dockerd[1802]: time="2024-12-27T17:40:34.602456292+01:00" level=info msg="API listen on /var/run/docker.sock"
Dec 27 17:40:34 RPi4 systemd[1]: Started service.system.docker.service.
RPi4:~ # systemctl stop docker
RPi4:~ # systemctl status service.system.docker | cat
○ service.system.docker.service - Docker Application Container Engine
     Loaded: loaded (/storage/.config/system.d/service.system.docker.service; enabled; preset: disabled)
     Active: inactive (dead) since Fri 2024-12-27 17:57:38 CET; 4s ago
   Duration: 16min 59.174s
       Docs: https://docs.docker.com
    Process: 1799 ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config (code=exited, status=0/SUCCESS)
    Process: 1802 ExecStart=/storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd --log-driver=journald --group=root $DOCKER_DAEMON_OPTS $DOCKER_STORAGE_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 1802 (code=exited, status=0/SUCCESS)
        CPU: 1.781s

Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.615991797+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: grpc: the client connection is closing"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.716271462+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: grpc: the client connection is closing"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.785884037+01:00" level=error msg="Error shutting down http server" error="context canceled"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786091309+01:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=moby
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786234527+01:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786304525+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: latest balancer error: connection error: desc = \"transport: Error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout\""
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786359801+01:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Dec 27 17:57:38 RPi4 systemd[1]: service.system.docker.service: Deactivated successfully.
Dec 27 17:57:38 RPi4 systemd[1]: Stopped service.system.docker.service.
Dec 27 17:57:38 RPi4 systemd[1]: service.system.docker.service: Consumed 1.781s CPU time.
RPi4:~ # systemctl status docker | cat
○ service.system.docker.service - Docker Application Container Engine
     Loaded: loaded (/storage/.config/system.d/service.system.docker.service; enabled; preset: disabled)
     Active: inactive (dead) since Fri 2024-12-27 17:57:38 CET; 11s ago
   Duration: 16min 59.174s
       Docs: https://docs.docker.com
    Process: 1799 ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config (code=exited, status=0/SUCCESS)
    Process: 1802 ExecStart=/storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd --log-driver=journald --group=root $DOCKER_DAEMON_OPTS $DOCKER_STORAGE_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 1802 (code=exited, status=0/SUCCESS)
        CPU: 1.781s

Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.615991797+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: grpc: the client connection is closing"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.716271462+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: grpc: the client connection is closing"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.785884037+01:00" level=error msg="Error shutting down http server" error="context canceled"
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786091309+01:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=moby
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786234527+01:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786304525+01:00" level=warning msg="Error while testing if containerd API is ready" error="Canceled: latest balancer error: connection error: desc = \"transport: Error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout\""
Dec 27 17:57:38 RPi4 dockerd[1802]: time="2024-12-27T17:57:38.786359801+01:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Dec 27 17:57:38 RPi4 systemd[1]: service.system.docker.service: Deactivated successfully.
Dec 27 17:57:38 RPi4 systemd[1]: Stopped service.system.docker.service.
Dec 27 17:57:38 RPi4 systemd[1]: service.system.docker.service: Consumed 1.781s CPU time.

Copy link
Contributor

@heitbaum heitbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine by me. (I haven’t build or run tested)

@mglae mglae merged commit 1a203a7 into LibreELEC:libreelec-12.0 Dec 28, 2024
@dtechsrv dtechsrv deleted the systemd-fix-aliases branch December 28, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Aliases do not work in systemd service scripts
3 participants