Skip to content

Commit

Permalink
Merge branch 'w/2.8/bugfix/bump-pause-image' into tmp/octopus/q/2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-e committed Feb 17, 2021
2 parents a0103d1 + 1b53ca3 commit d906a50
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
(PR [#3083](https://github.com/scality/metalk8s/pull/3083))

## 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 @@ -173,8 +173,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 @@ -61,7 +61,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

0 comments on commit d906a50

Please sign in to comment.