puppetlabs / puppetlabs/puppetlabs-docker

With Ubuntu on arm64 apt/sources.list.d/docker.list specifies wrong architecture by default

Open
#494 10 comments 1 reaction 0 assignees View on GitHub

@saz is already working on this.

Since Feb 15, 2023.

  • #898 by @saz — open
Dominant language
Ruby
Stars
94
Forks
337
Avg merge
11d 15h
Merged PRs (30d)
2

Description

What you expected to happen?

On a Raspberry Pi 3 with Ubuntu 18.04 I expected this to be able to install Docker.

What happened?

Docker fails to install. The base error is that /etc/apt/sources.list.d/docker.list specifies the wrong architecture:

# This file is managed by Puppet. DO NOT EDIT.
# docker
deb [arch=aarch64] https://download.docker.com/linux/ubuntu bionic stable

For apt the correct architecture for 64-bit ARM is arm64.

How to reproduce it?

class { 'docker':
  version => '5:18.09.6~3-0~ubuntu-bionic',
}

Anything else we need to know?

To workaround this I have to add:

class { 'docker::repos':
  architecture => 'arm64',
}

docker::repos gets the default value of architecture from $facts['architecture']. Looking through all the facts returned on a Raspberry Pi 3 I cannot see any fact returning arm64. So I'm not sure what the correct fact would be or how other modules handle this.

Versions:

$ puppet --version
5.4.0

$ docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:40:48 2019
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 02:00:10 2019
  OS/Arch:          linux/arm64
  Experimental:     false

$ facter os
{
  architecture => "aarch64",
  distro => {
    codename => "bionic",
    description => "Ubuntu 18.04.2 LTS",
    id => "Ubuntu",
    release => {
      full => "18.04",
      major => "18.04"
    }
  },
  family => "Debian",
  hardware => "aarch64",
  name => "Ubuntu",
  release => {
    full => "18.04",
    major => "18.04"
  },
  selinux => {
    enabled => false
  }
}

$ puppet module list
/usr/share/puppet/modules (no modules installed)

Logs:

Run with --debug here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the docker::repos architecture default and the generated /etc/apt/sources.list.d/docker.list, then compare Facter's aarch64 value with apt's required arm64 value. Done means a Raspberry Pi 3 on Ubuntu 18.04 can install Docker without setting the architecture override; an open linked pull request already tracks this work.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ruby
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.