From 9312d458b4254b48e331d1ae40cb2f6d0fec9bd0 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 10:50:27 +0200 Subject: systemd: symlink user->system Symlink the user to the system services in `contrib/systemd`. There is no diference between the services, so we can reduce redundancy while not breaking downstream packages which might already be referencing `./contrib/systemd/user`. Signed-off-by: Valentin Rothberg --- contrib/systemd/user | 1 + contrib/systemd/user/podman.service | 17 ----------------- contrib/systemd/user/podman.socket | 10 ---------- 3 files changed, 1 insertion(+), 27 deletions(-) create mode 120000 contrib/systemd/user delete mode 100644 contrib/systemd/user/podman.service delete mode 100644 contrib/systemd/user/podman.socket diff --git a/contrib/systemd/user b/contrib/systemd/user new file mode 120000 index 000000000..3f3d9896b --- /dev/null +++ b/contrib/systemd/user @@ -0,0 +1 @@ +./system/ \ No newline at end of file diff --git a/contrib/systemd/user/podman.service b/contrib/systemd/user/podman.service deleted file mode 100644 index eaa2ec437..000000000 --- a/contrib/systemd/user/podman.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Podman API Service -Requires=podman.socket -After=podman.socket -Documentation=man:podman-api(1) -StartLimitIntervalSec=0 - -[Service] -Type=oneshot -Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf -ExecStart=/usr/bin/podman system service -TimeoutStopSec=30 -KillMode=process - -[Install] -WantedBy=multi-user.target -Also=podman.socket diff --git a/contrib/systemd/user/podman.socket b/contrib/systemd/user/podman.socket deleted file mode 100644 index 8b22e31e4..000000000 --- a/contrib/systemd/user/podman.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Podman API Socket -Documentation=man:podman-api(1) - -[Socket] -ListenStream=%t/podman/podman.sock -SocketMode=0660 - -[Install] -WantedBy=sockets.target -- cgit v1.2.3-54-g00ecf From 2e6946c77717509f3e3d47a2d2ef9411505029e9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 10:55:04 +0200 Subject: podman.service: remove stop timeout Remove the stop timeout from the unit. As unit does not specify any stop command, the timeout is effectively 0 and a NOOP. Signed-off-by: Valentin Rothberg --- contrib/systemd/system/podman.service | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index eaa2ec437..d75b1ee71 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -9,7 +9,6 @@ StartLimitIntervalSec=0 Type=oneshot Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf ExecStart=/usr/bin/podman system service -TimeoutStopSec=30 KillMode=process [Install] -- cgit v1.2.3-54-g00ecf From 2b6dd3fb4384eca6d8270f67688ce5fc9f967dd4 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 10:56:13 +0200 Subject: podman.service: use default killmode Do not set the killmode to process as it only kills the main process and leaves other processes untouched. Just remove the line and use the default cgroup killmode which will kill all processes in the service's cgroup. Fixes: #7021 Signed-off-by: Valentin Rothberg --- contrib/systemd/system/podman.service | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index d75b1ee71..d466f8841 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -9,7 +9,6 @@ StartLimitIntervalSec=0 Type=oneshot Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf ExecStart=/usr/bin/podman system service -KillMode=process [Install] WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf From 21665cbfa6936775d224feab089f647f8e7785cd Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 10:58:29 +0200 Subject: podman.service: use default registries.conf Do not hard-set the registries.conf to `/etc/containers/registries.conf`. Podman (and other c/image users) already default to it. However, ordinary non-root users should still be able to use the configs in their home directories which is now possible. Signed-off-by: Valentin Rothberg --- contrib/systemd/system/podman.service | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index d466f8841..c89f967e2 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -7,7 +7,6 @@ StartLimitIntervalSec=0 [Service] Type=oneshot -Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf ExecStart=/usr/bin/podman system service [Install] -- cgit v1.2.3-54-g00ecf From 0f22b69c03ef8d9f9c856c7c1c8da8ff5caaf227 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 11:08:30 +0200 Subject: podman.service: set doc to podman-system-service podman-api(1) does not exist, so set the man page to podman-system-service(1). Same for the .socket. Signed-off-by: Valentin Rothberg --- contrib/systemd/system/podman.service | 2 +- contrib/systemd/system/podman.socket | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index c89f967e2..e876fe304 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -2,7 +2,7 @@ Description=Podman API Service Requires=podman.socket After=podman.socket -Documentation=man:podman-api(1) +Documentation=man:podman-system-service(1) StartLimitIntervalSec=0 [Service] diff --git a/contrib/systemd/system/podman.socket b/contrib/systemd/system/podman.socket index 8b22e31e4..397058ee4 100644 --- a/contrib/systemd/system/podman.socket +++ b/contrib/systemd/system/podman.socket @@ -1,6 +1,6 @@ [Unit] Description=Podman API Socket -Documentation=man:podman-api(1) +Documentation=man:podman-system-service(1) [Socket] ListenStream=%t/podman/podman.sock -- cgit v1.2.3-54-g00ecf From 38bb6756b8d3085afdc86ab787ca6f1bc2995ba9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 20 Jul 2020 11:42:49 +0200 Subject: podman.service: set type to simple Set the type of the podman.service to simple. This will correctly report the status of the service once it has started. As a oneshot service, it does not transition from the startup state to running. Signed-off-by: Valentin Rothberg --- contrib/systemd/system/podman.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index e876fe304..4a63735a3 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -6,7 +6,7 @@ Documentation=man:podman-system-service(1) StartLimitIntervalSec=0 [Service] -Type=oneshot +Type=simple ExecStart=/usr/bin/podman system service [Install] -- cgit v1.2.3-54-g00ecf