Skip to content

Apt pin breaks updates #424

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

Closed
baurmatt opened this issue Feb 12, 2019 · 3 comments
Closed

Apt pin breaks updates #424

baurmatt opened this issue Feb 12, 2019 · 3 comments
Milestone

Comments

@baurmatt
Copy link
Contributor

What you expected to happen?

include docker

Installs docker and keeps it update after running apt-get dist-upgrade.

What happened?

The module configure a pin of 10 by default which prevents updates from happening:

root@example:~# cat /etc/apt/preferences.d/docker.pref
# This file is managed by Puppet. DO NOT EDIT.
Explanation: docker: docker
Package: *
Pin: origin download.docker.com
Pin-Priority: 10
root@example:~# apt-get update &> /dev/null && apt-get -u upgrade --assume-no
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
root@example:~# apt-cache policy docker-ce | head -n 15
docker-ce:
  Installed: 18.06.1~ce~3-0~ubuntu
  Candidate: 18.06.1~ce~3-0~ubuntu
  Version table:
     5:18.09.2~3-0~ubuntu-xenial 10
         10 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     5:18.09.1~3-0~ubuntu-xenial 10
         10 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     5:18.09.0~3-0~ubuntu-xenial 10
         10 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     18.06.2~ce~3-0~ubuntu 10
         10 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 *** 18.06.1~ce~3-0~ubuntu 100
         10 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
        100 /var/lib/dpkg/status

How to reproduce it?

Puppet

include docker

Shell:

apt-get update
apt-get dist-upgrade

Anything else we need to know?

Versions:

$ puppet --version
6.2.0
$ docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:24:56 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:23:21 2018
  OS/Arch:          linux/amd64
  Experimental:     false
$ facter os
{
  architecture => "amd64",
  distro => {
    codename => "xenial",
    description => "Ubuntu 16.04.5 LTS",
    id => "Ubuntu",
    release => {
      full => "16.04",
      major => "16.04"
    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Ubuntu",
  release => {
    full => "16.04",
    major => "16.04"
  },
  selinux => {
    enabled => false
  }
}
$ puppet module list

Logs:

Paste any relevant logs from a puppet run
@baurmatt
Copy link
Contributor Author

I will provide a PR.

baurmatt added a commit to syseleven/puppetlabs-docker that referenced this issue Feb 12, 2019
As the default of this module is to install Docker from the offical
Docker repository, we should also configure the pin accordingly.

Fixes puppetlabs#424.
@florindragos
Copy link
Contributor

Hi @baurmatt,

The pin value is actually configurable using the apt_source_pin_level parameter: https://github.com/puppetlabs/puppetlabs-docker/blob/master/manifests/init.pp#L441

Have you tried setting that to 500 ?

@baurmatt
Copy link
Contributor Author

Hey @florindragos, I'm aware. But a default of 10 is still broken if the repository is configured by default. This is IMHO not what users expect.

davejrt pushed a commit that referenced this issue Feb 12, 2019
As the default of this module is to install Docker from the offical
Docker repository, we should also configure the pin accordingly.

Fixes #424.
@davejrt davejrt added this to the 3.2.1 milestone Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants