Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pause image to 3.2 #3120

Merged
merged 2 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CHANGELOG

## Release 2.7.2 (in development)
### Bug fixes
- Embed `pause` image version 3.2 instead of 3.1 needed for MetalK8s to work
offline (needed by containerd version superior to 1.4.0)
(PR [#3120](https://github.com/scality/metalk8s/pull/3120))

## Release 2.7.1
### Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions buildchain/buildchain/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def _version_prefix(version: str, prefix: str = 'v') -> str:
),
Image(
name='pause',
version='3.1',
digest='sha256:da86e6ba6ca197bf6bc5e9d900febd906b133eaa4750e6bed647b0fbe50ed43e',
version='3.2',
digest='sha256:80d28bedfe5dec59da9ebf8e6260224ac9008ab5c11dbbe16ee3ba3e4439ac2c',
),
Image(
name='prometheus',
Expand Down
4 changes: 3 additions & 1 deletion salt/_states/containerd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def image_managed(name, archive_path=None):
})
return ret

result = __salt__['containerd.load_cri_image'](path=archive_path)
real_archive_path = __salt__['cp.cache_file'](archive_path, __env__)

result = __salt__['containerd.load_cri_image'](path=real_archive_path)
# ctr can fail to load the image and exit silently
if result['retcode'] == 0 and __salt__['cri.available'](name):
ret['changes'].update({
Expand Down
15 changes: 5 additions & 10 deletions salt/metalk8s/container-engine/containerd/configured.sls
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
{% from "metalk8s/map.jinja" import metalk8s with context %}
{%- from "metalk8s/map.jinja" import repo with context %}

include:
- .installed
- .running

{%- set pause_version = repo.images.pause.version %}

Inject pause image:
# The `containerd` states require the `cri` module, which requires `crictl`
file.managed:
- name: /tmp/pause-3.1.tar
- source: salt://{{ slspath }}/files/pause-3.1.tar
- unless: >-
ctr -n k8s.io image ls -q | grep k8s.gcr.io/pause | grep 3\\.1
- require:
- sls: metalk8s.container-engine.containerd.running
containerd.image_managed:
- name: k8s.gcr.io/pause:3.1
- archive_path: /tmp/pause-3.1.tar
- name: k8s.gcr.io/pause:{{ pause_version }}
- archive_path: salt://{{ slspath }}/files/pause-{{ pause_version }}.tar
- require:
- file: Inject pause image
- metalk8s_package_manager: Install and configure cri-tools