mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 15:19:12 +00:00
cluster/gce/gci: revert PATH change when using custom runc
Commit 6031ff29c1
("make containerd download more robust") updated the containerd systemd
unit to use `Environment=PATH=/home/containerd/bin:$PATH`. However,
environment variables are not evaluated in systemd units in that way.
This resulted in containerd running with the literal value
`/home/containerd/bin:$PATH` for its PATH, breaking containerd (it could
not access the apparmor_parser program).
The old way passes the PATH that configure.sh runs with to containerd,
which is not optimal, but at least it doesn't break the tests. Let's
revert to the old way.
This commit is contained in:
@@ -610,7 +610,7 @@ function install-containerd-cos {
|
||||
if download-robust "runc ${COS_INSTALL_RUNC_VERSION}" "${temp_dir}" \
|
||||
"https://github.com/opencontainers/runc/releases/download/${COS_INSTALL_RUNC_VERSION}/runc.${HOST_ARCH}"; then
|
||||
cp "${temp_dir}/runc.${HOST_ARCH}" /home/containerd/bin/runc && chmod 755 /home/containerd/bin/runc
|
||||
sed -i "/\[Service\]/a Environment=PATH=/home/containerd/bin:\$PATH" /etc/systemd/system/containerd.service
|
||||
sed -i "/\[Service\]/a Environment=PATH=/home/containerd/bin:$PATH" /etc/systemd/system/containerd.service
|
||||
fi
|
||||
rm -rf "${temp_dir}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user