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

using Packages from Debian Repository fails with missing docker-ce-cli package #797

Closed
peterbeck opened this issue Feb 12, 2022 · 4 comments

Comments

@peterbeck
Copy link

peterbeck commented Feb 12, 2022

When using the Debian repo (use_upstream_pacakge_source => false) the module is trying to install docker-ce-cli, which is not available in the Debian repositories. There is just 'docker.io'.
This only happens when using puppetlabs-docker > 4.0.1

E: Package 'docker-ce-cli' has no installation candidate
Error: /Stage[main]/Docker::Install/Package[docker-ce-cli]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install docker-ce-cli' returned 100: 
...
Package docker-ce-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

I know Debian 11 is officially not on the supported OS list... and I'd like to use the packages from the official Debian repository.

Expected Behavior

With puppetlabs-docker 4.0.1 everything works as expected. I think this issue was introduced with #740.

Steps to Reproduce

Steps to reproduce the behavior:

  1. install puppetlabs-docker > 4.0.1
  2. run puppet with this configuration:
class { 'docker':
   use_upstream_package_source => false,
   service_overrides_template  => false,
   docker_ce_package_name      => 'docker.io',
}

is there a way to get around this issue and using the latest module version ?
Or am I doing something wrong ?

Thanks and regards
Peter

Environment

  • puppetlabs-docker >= 4.1.0
  • Debian 11.2 / Bullseye
  • puppet agent 7.14.0
  • puppetserver 7.6.0
@kenyon
Copy link
Contributor

kenyon commented Feb 12, 2022

I'd guess we need to remove https://github.com/puppetlabs/puppetlabs-docker/blob/main/manifests/install.pp#L83-L86 and the test for that.

@peterbeck
Copy link
Author

Hi @kenyon,

just upgraded to 4.1.2 and commented the mentioned code section. Works fine without errors.
In my case it is running fine again.

Regards
Peter

kenyon added a commit to kenyon/puppetlabs-docker that referenced this issue Feb 13, 2022
In puppetlabs#740 I mistakenly added code that manages the docker-ce-cli package
when managing the "docker" package. The docker-ce-cli package should
only be managed when also managing the docker-ce package.

Fixes puppetlabs#797
@vchepkov
Copy link
Contributor

vchepkov commented May 4, 2022

Same problem exists on RHEL as well, manifests tries to install package even if docker-ce is not used

@chelnak
Copy link
Contributor

chelnak commented May 4, 2022

I think this PR should fix it.

#798

vchepkov pushed a commit to vchepkov/puppetlabs-docker that referenced this issue May 5, 2022
In puppetlabs#740 I mistakenly added code that manages the docker-ce-cli package
when managing the "docker" package. The docker-ce-cli package should
only be managed when also managing the docker-ce package.

Fixes puppetlabs#797
@chelnak chelnak closed this as completed in 81c14ff May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants