puppetlabs / puppetlabs-docker

The Puppet Docker repository
Apache License 2.0
86 stars 297 forks source link

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

Open akremer opened 3 months ago

akremer commented 3 months ago

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:

https://github.com/puppetlabs/pdk/issues/1143 https://github.com/ruby/psych/discussions/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

Additional Context

Add any other context about the problem here.

HomebrewDotNET commented 2 months ago

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