Skip to content

Some facts (including the docker fact) fail with wrong number of arguments (given 2, expected 1) #771

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
johanfleury opened this issue Aug 29, 2021 · 0 comments · Fixed by #773

Comments

@johanfleury
Copy link
Contributor

Describe the Bug

Since version 4.1.1, facter fails with this error message:

Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)

Expected Behavior

The facts shouldn’t fail.

Steps to Reproduce

  1. Add puppetlabs/docker to your Puppetfile
  2. Go to a machine without docker installed and run puppet agent -t
  3. Puppet will show the following output:
# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker_version', resolution='<anonymous>': wrong number of arguments (given 2, expected 1)
Error: Facter: Error while resolving custom fact fact='docker', resolution='<anonymous>': undefined method `match?' for nil:NilClass
Info: Caching catalog for nas01.br0.fr
Info: Applying configuration version '1630201010'
Notice: Applied catalog in 10.98 seconds

Environment

  • Version:
    • Puppet: 7.10.0
    • puppetlabs/docker: 4.1.1
  • Platform: Debian 10 (buster)

Additional Context

This bug was introduced by 6b83e98, released with 4.1.1, and makes the whole docker fact unusable.

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

Successfully merging a pull request may close this issue.

1 participant