Cannot override docker.io

Bug #1943545 reported by Vern Hart
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Containerd Subordinate Charm
Fix Released
High
George Kraft

Bug Description

In an offline deployment, we want the default docker.io registry to point to our private registry.

If I set custom_registries set to:

  [{"host": "docker.io", "url": "https://my.registry.com:5043"}]

Then a subsection of config.toml looks like:

        [plugins.cri.registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]
    [plugins.cri.registry.mirrors."docker.io"]
          endpoint = ["https://my.registry.com:5043"]

Ignoring the messy indentation, this seems like it might work but the charm's workload status is blocked with "Container runtime not available" and when trying to start containerd manually we get:

  containerd: failed to load TOML: /etc/containerd/config.toml: (54, 6): duplicated tables

When there is a host docker.io in custom_registries, we must not write the default docker.io line.

Vern Hart (vern)
description: updated
Revision history for this message
Vern Hart (vern) wrote :

This is my simple solution. If there isn't a docker.io entry in custom_registries, I insert one. And then the template doesn't need any extra logic to figure out whether to output the docker.io host or not.

Revision history for this message
Vern Hart (vern) wrote (last edit ):

Subscribing field-high as this is blocking support handover for a customer deployment.

George Kraft (cynerva)
Changed in charm-containerd:
importance: Undecided → High
status: New → Triaged
George Kraft (cynerva)
Changed in charm-containerd:
assignee: nobody → George Kraft (cynerva)
status: Triaged → In Progress
Revision history for this message
George Kraft (cynerva) wrote :
tags: added: review-needed
tags: removed: review-needed
Changed in charm-containerd:
milestone: none → 1.22+ck1
status: In Progress → Fix Committed
tags: added: backport-needed
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :
tags: removed: backport-needed
George Kraft (cynerva)
Changed in charm-containerd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.