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

docker_stack uses outdated way of using psych's YAML.safe_load #973

Open
akremer opened this issue Mar 25, 2024 · 2 comments
Open

docker_stack uses outdated way of using psych's YAML.safe_load #973

akremer opened this issue Mar 25, 2024 · 2 comments
Labels

Comments

@akremer
Copy link

akremer commented Mar 25, 2024

Describe the Bug

This module inherited a bug in PDK which causes the docker_stack resource to ungracefully fail with a "wrong number of arguments" error while calling psych's YAML.safe_load.

See the following issues:

puppetlabs/pdk#1143
ruby/psych#571

It looks like this issue was fixed in 2021, however, this module is still using the old way of calling safe_load in both of these resources. Any recent installation of psych (which is a dependency of the PDK) will error out.

Expected Behavior

I should be able to use docker_stack without an error.

Steps to Reproduce

Deploy a docker_stack resource with a version of psych greater than 4 on the host system. You can see the version of the gem installed in /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems although your installed version of ruby may be different.

Environment

  • Version 9.1
  • Platform Ubuntu 22

Additional Context

Add any other context about the problem here.

@akremer akremer added the bug label Mar 25, 2024
@HomebrewDotNET
Copy link

After spending 4 hours trying to get the docker module to work I finally found out I'm running in the above bug. Does not work with the latest version of the puppetserver on ubuntu

@akremer akremer changed the title docker_stack and docker_compose use outdated way of using psych's YAML.safe_load docker_stack uses outdated way of using psych's YAML.safe_load Apr 16, 2024
@Mike7518
Copy link

Got this error when applying a puppet config containing an instance of docker_stack :

Could not evaluate: wrong number of arguments (given 4, expected 1)

Manually applying the mentioned pull request (#976) to the code fixed this issue

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

No branches or pull requests

3 participants