Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: containerd downloads every time #458

Merged

Conversation

jackfrancis
Copy link
Member

Reason for Change:

Checks for the existence of containerd binary before downloading

Issue Fixed:

reverts some of the changes introduced in #183

Requirements:

Notes:

@acs-bot acs-bot added the size/S label Feb 7, 2019
@jackfrancis jackfrancis force-pushed the containerd-dont-always-download branch from aaed4f5 to 281d54e Compare February 7, 2019 20:21
@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

Merging #458 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #458   +/-   ##
=======================================
  Coverage   53.43%   53.43%           
=======================================
  Files          95       95           
  Lines       14391    14391           
=======================================
  Hits         7690     7690           
  Misses       6038     6038           
  Partials      663      663

@jackfrancis
Copy link
Member Author

Confirmed VHD-based installation no longer installs containerd:

+ installContainerd
+ containerd --version
+ rm -rf /opt/cni/downloads
containerd github.com/containerd/containerd v1.1.5 5960cade475fb25a181705d7eccbacc0313bcd7b
+ '[' 0 -eq 0 ']'
+ echo 'containerd is already installed, skipping download'
containerd is already installed, skipping download

@jackfrancis
Copy link
Member Author

Verified that non-VHD based installations work:

+ downloadContainerd
+ mkdir -p /opt/containerd/downloads
+ retrycmd_get_tarball 120 5 /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz https://storage.googleapis.com/cri-containerd-release/cri-containerd-1.1.5.linux-amd64.tar.gz
+ tar_retries=120
+ wait_sleep=5
+ tarball=/opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz
+ url=https://storage.googleapis.com/cri-containerd-release/cri-containerd-1.1.5.linux-amd64.tar.gz
+ echo '120 retries'
120 retries
++ seq 1 120
+ for i in '$(seq 1 $tar_retries)'
+ tar -tzf /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz
tar (child): /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
+ '[' 2 -eq 0 ']'
+ '[' 1 -eq 120 ']'
+ timeout 60 curl -fsSL https://storage.googleapis.com/cri-containerd-release/cri-containerd-1.1.5.linux-amd64.tar.gz -o /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz
+ sleep 5
+ for i in '$(seq 1 $tar_retries)'
+ tar -tzf /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz
./
./opt/
./opt/containerd/
./opt/containerd/cluster/
./opt/containerd/cluster/version
./opt/containerd/cluster/gce/
./opt/containerd/cluster/gce/cloud-init/
./opt/containerd/cluster/gce/cloud-init/master.yaml
./opt/containerd/cluster/gce/cloud-init/node.yaml
./opt/containerd/cluster/gce/env
./opt/containerd/cluster/gce/configure.sh
./opt/containerd/cluster/gce/cni.template
./opt/containerd/cluster/health-monitor.sh
./usr/
./usr/local/
./usr/local/bin/
./usr/local/bin/containerd-stress
./usr/local/bin/crictl
./usr/local/bin/ctr
./usr/local/bin/critest
./usr/local/bin/containerd
./usr/local/bin/containerd-shim
./usr/local/bin/containerd-release
./usr/local/sbin/
./usr/local/sbin/runc
./etc/
./etc/systemd/
./etc/systemd/system/
./etc/systemd/system/containerd.service
./etc/crictl.yaml
+ '[' 0 -eq 0 ']'
+ break
+ tar -xzf /opt/containerd/downloads/cri-containerd-1.1.5.linux-amd64.tar.gz -C /
+ sed -i '/\[Service\]/a ExecStartPost=\/sbin\/iptables -P FORWARD ACCEPT' /etc/systemd/system/containerd.service
+ rm -Rf /opt/containerd/downloads
+ echo 'Successfully installed cri-containerd...'
Successfully installed cri-containerd...

@CecileRobertMichon
Copy link
Contributor

/lgtm

@acs-bot
Copy link

acs-bot commented Feb 7, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit 00594cd into Azure:master Feb 7, 2019
@jackfrancis jackfrancis deleted the containerd-dont-always-download branch February 7, 2019 21:38
juhacket pushed a commit to juhacket/aks-engine that referenced this pull request Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants