Skip to content

Docker module don't work on debian 9.12 #626

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
f-michaut opened this issue Jun 22, 2020 · 3 comments
Closed

Docker module don't work on debian 9.12 #626

f-michaut opened this issue Jun 22, 2020 · 3 comments

Comments

@f-michaut
Copy link

Describe the Bug

I don't know if this is a puppetlabs-docker or a facter problem, but in params.pp:141 of the docker puppet module, the fact os.distro.codename used to determine the default package release does not exist on my machine.

Here is the output of puppet facts show :

    "os": {
      "name": "Debian",
      "family": "Debian",
      "release": {
        "major": "9",
        "minor": "12",
        "full": "9.12"
      },
      "lsb": {
        "distcodename": "stretch",
        "distid": "Debian",
        "distdescription": "Debian GNU/Linux 9.12 (stretch)",
        "distrelease": "9.12",
        "majdistrelease": "9",
        "minordistrelease": "12"
      }
    },

Expected Behavior

Instead of the following error message :
Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. at modules/docker/manifests/params.pp:141:51
I expected to be able to use the docker module on debian 9.12

Steps to Reproduce

sudo apt install puppet
Install puppetlabs-docker 3.10.1
Just add require 'docker' in your script

Environment

Debian 9.12
puppet 4.8.2

@f-michaut f-michaut added the bug label Jun 22, 2020
@martialblog
Copy link

Hi,

seems to be an issue with older facter versions:

$ facter --version
2.5.6
$ facter os 
{"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"10", "minor"=>"5", "full"=>"10.5"}, "lsb"=>{"distcodename"=>"buster", "distid"=>"Debian", "distdescription"=>"Debian GNU/Linux 10 (buster)", "distrelease"=>"10", "majdistrelease"=>"10"}}

$ facter --version
3.14.12 (commit 70d26da13c9fee27973c1eb22200871e21445d97)

$ facter os.distro
{
  codename => "buster",
  description => "Debian GNU/Linux 10 (buster)",
  id => "Debian",
  release => {
    full => "10.5",
    major => "10",
    minor => "5"
  }
}

In the older version facts['os']['distro']['codename']} is not not present. The change was introduced in this refactor: 915bf8a#diff-2f383a197b1a428561b364755701d60eL146

An update to a newer (3.*) facter version did fix the problem in my tests.

@Tozapid
Copy link
Contributor

Tozapid commented Oct 24, 2020

I have reproduced the same error:

$facter -v
2.4.6

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /etc/puppetlabs/code/environments/production/modules/docker/manifests/params.pp, line: 139, column: 51) on node server
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Tozapid added a commit to Tozapid/puppetlabs-docker that referenced this issue Oct 26, 2020
adrianiurca added a commit that referenced this issue Oct 28, 2020
Added compatibility with facter 2.4.6 #626
@github-actions
Copy link

This issue has been marked as stale because it has been open for a while and has had no recent activity. If this issue is still important to you please drop a comment below and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants