From 83ea2ed26b645fe2a701ed4d2b4d758df383b87e Mon Sep 17 00:00:00 2001 From: Margarita Manterola Date: Mon, 8 Mar 2021 17:59:05 +0100 Subject: [PATCH] Add explicit paths to coreos-metadata and containerd executables While the execution of the unit may succeed by finding the executables by searching the current PATH, calling `systemd-analyze verify` on the units fails because this requires an absolute path. --- .../app-emulation/containerd/files/containerd-1.0.0.service | 4 ++-- .../coreos-base/afterburn/files/coreos-metadata.service | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/files/containerd-1.0.0.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/files/containerd-1.0.0.service index d5508823e4..722f363c1b 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/files/containerd-1.0.0.service +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/files/containerd-1.0.0.service @@ -6,8 +6,8 @@ After=network.target [Service] Delegate=yes Environment=CONTAINERD_CONFIG=/usr/share/containerd/config.toml -ExecStartPre=mkdir -p /run/docker/libcontainerd -ExecStartPre=ln -fs /run/containerd/containerd.sock /run/docker/libcontainerd/docker-containerd.sock +ExecStartPre=/usr/bin/mkdir -p /run/docker/libcontainerd +ExecStartPre=/usr/bin/ln -fs /run/containerd/containerd.sock /run/docker/libcontainerd/docker-containerd.sock ExecStartPre=-/sbin/modprobe overlay ExecStart=/usr/bin/containerd --config ${TORCX_UNPACKDIR}${TORCX_IMAGEDIR}${CONTAINERD_CONFIG} KillMode=process diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service index 8f67c07de5..9204dedffc 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service @@ -8,7 +8,7 @@ Restart=on-failure RestartSec=10 Environment=COREOS_METADATA_OPT_PROVIDER=--cmdline ExecStart=/usr/bin/coreos-metadata ${COREOS_METADATA_OPT_PROVIDER} --attributes=/run/metadata/flatcar -ExecStartPost=ln -fs /run/metadata/flatcar /run/metadata/coreos +ExecStartPost=/usr/bin/ln -fs /run/metadata/flatcar /run/metadata/coreos [Install] RequiredBy=metadata.target