summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2021-01-12 17:50:33 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-12 17:54:10 -0800
commit8b0f0b4d11e0938eec8da411323b2ce35976ab56 (patch)
treeaab8e37ca51133da5bfa4a055ea0dfa0bda514cf /tools
parentbe2b9d75d75e0e7371cd868589d57f4ddee44781 (diff)
Delete shim v1
gvisor-containerd-shim is not compatible with containerd 1.1 or earlier. Starting from containerd 1.2, shim v2 is the preferred interface. PiperOrigin-RevId: 351485556
Diffstat (limited to 'tools')
-rwxr-xr-xtools/go_branch.sh2
-rw-r--r--tools/installers/BUILD3
-rwxr-xr-xtools/installers/containerd.sh14
-rwxr-xr-xtools/installers/shim.sh1
4 files changed, 7 insertions, 13 deletions
diff --git a/tools/go_branch.sh b/tools/go_branch.sh
index 3a6a83f2e..4b18c015f 100755
--- a/tools/go_branch.sh
+++ b/tools/go_branch.sh
@@ -144,7 +144,7 @@ EOF
# There are a few solitary files that can get left behind due to the way bazel
# constructs the gopath target. Note that we don't find all Go files here
# because they may correspond to unused templates, etc.
-declare -ar binaries=( "runsc" "shim/v1" "shim/v2" "webhook" )
+declare -ar binaries=( "runsc" "shim" "webhook" )
for target in "${binaries[@]}"; do
mkdir -p "${target}"
cp "${repo_orig}/${target}"/*.go "${target}/"
diff --git a/tools/installers/BUILD b/tools/installers/BUILD
index bbf3c1f85..d9f9c4c40 100644
--- a/tools/installers/BUILD
+++ b/tools/installers/BUILD
@@ -27,7 +27,6 @@ sh_binary(
name = "shim",
srcs = ["shim.sh"],
data = [
- "//shim/v1:gvisor-containerd-shim",
- "//shim/v2:containerd-shim-runsc-v1",
+ "//shim:containerd-shim-runsc-v1",
],
)
diff --git a/tools/installers/containerd.sh b/tools/installers/containerd.sh
index d28549734..e598bce89 100755
--- a/tools/installers/containerd.sh
+++ b/tools/installers/containerd.sh
@@ -75,14 +75,11 @@ install_helper github.com/containerd/containerd "v${CONTAINERD_VERSION}" "${GOPA
install_helper github.com/kubernetes-sigs/cri-tools "v${CRITOOLS_VERSION}" "${GOPATH}"
# Configure containerd-shim.
-#
-# Note that for versions <= 1.1 the legacy shim must be installed in /usr/bin,
-# which should align with the installer script in head.sh (or master.sh).
-if [[ "${CONTAINERD_MAJOR}" -le 1 ]] && [[ "${CONTAINERD_MINOR}" -lt 2 ]]; then
- declare -r shim_config_path=/etc/containerd/gvisor-containerd-shim.toml
- mkdir -p $(dirname ${shim_config_path})
- cat > ${shim_config_path} <<-EOF
- runc_shim = "/usr/bin/containerd-shim"
+declare -r shim_config_path=/etc/containerd/runsc/config.toml
+mkdir -p $(dirname ${shim_config_path})
+cat > ${shim_config_path} <<-EOF
+log_path = "/tmp/shim-logs/"
+log_level = "debug"
[runsc_config]
debug = "true"
@@ -90,7 +87,6 @@ if [[ "${CONTAINERD_MAJOR}" -le 1 ]] && [[ "${CONTAINERD_MINOR}" -lt 2 ]]; then
strace = "true"
file-access = "shared"
EOF
-fi
# Configure CNI.
(cd "${GOPATH}" && src/github.com/containerd/containerd/script/setup/install-cni)
diff --git a/tools/installers/shim.sh b/tools/installers/shim.sh
index 8153ce283..9af50b5c7 100755
--- a/tools/installers/shim.sh
+++ b/tools/installers/shim.sh
@@ -30,4 +30,3 @@ if [[ -d "$0.runfiles" ]]; then
runfiles="$0.runfiles"
fi
find -L "${runfiles}" -executable -type f -name containerd-shim-runsc-v1 -exec cp -L {} "${containerd_install_dir}" \;
-find -L "${runfiles}" -executable -type f -name gvisor-containerd-shim -exec cp -L {} "${containerd_install_dir}" \;