From 48cb5f048e29aadb1eed319117e529c05c850533 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 (limited to 'contrib/systemd') 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 1624fbb9433782709e8e4eb28716d7935f1678ae 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(-) (limited to 'contrib/systemd') 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 1123738868b66ab2fd3d6ede556a62e8e168af4d 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(-) (limited to 'contrib/systemd') 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 a7ffdf954fa1d28b7650237f91ca3b6c75f1b58d 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(-) (limited to 'contrib/systemd') 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 a334e780b52dfa4321be8e0fc57c8bd95085df6a 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(-) (limited to 'contrib/systemd') 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 87ccd28d06a6369e6f386b0a687a744bee15b1f1 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(-) (limited to 'contrib/systemd') 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