puppetlabs-docker icon indicating copy to clipboard operation
puppetlabs-docker copied to clipboard

docker-compose download URL is incorrect in versions 2+ due to capitalized "Linux" fact

Open akomakom opened this issue 2 years ago • 1 comments

Describe the Bug

Class docker::compose silently fails to download/install the binary (file contains the string "Not Found").

Expected Behavior

docker::compose should install docker-compose binary to /usr/local/bin/

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install latest version of puppetlabs-docker (6.0.2)
  2. Add class {'docker::compose': version => '2.6.0'} in a host manifest
  3. Apply manifest
  4. Check contents of /usr/local/bin/docker-compose-[VERSION] (Mine contains the string "Not Found")
  5. Try puppet agent -td, download URL is printed:
Debug: Executing: 'curl -s -S -L  https://github.com/docker/compose/releases/download/2.6.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose-2.6.0'
Notice: /Stage[main]/Docker::Compose/Exec[Install Docker Compose 2.6.0]/returns: executed successfully (corrective)

Note that no error is raised. Linux is uppercase.

Environment

  • Version 6.0.2
  • Puppet 7.24
  • Platform CentOS 7, Rocky 8, Ubuntu 22, etc

Additional Context

The download URL is built using ${::kernel}, which resolves to Linux on all my systems. The correct URL string would be linux (lowercase).

Additionally, the v prefix seems to apear in 2+ versions, although that can be passed in the parameter.

akomakom avatar Apr 11 '23 15:04 akomakom

Related to #902.

kenyon avatar Apr 11 '23 17:04 kenyon