Closed
Description
Describe the Bug
The new function docker_params_changed
introduced in #648
calls docker inspect
via a popen call.
This function running on a puppet server does not make sense I believe.
At the very least docker would have to be installed on the puppet server but I don't believe it makes sense
anyway as the particular instances could not be expected.
docker::run { 'helloworld':
image => 'base',
command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
restart => 'no',
}
results in
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Cannot run program "docker" (in directory "/opt/puppetlabs/server/a
pps/puppetserver"): error=2, No such file or directory (file: /mnt/puppetnfsdir/environments/straylen_dns/modules/docker/manifests/run.pp, line: 408, column: 25) (file: /mnt/puppetnfsdir/environments/straylen_dns/hostgroups/hg_playground/manifests/straylen/new.pp, line: 25) on
Expected Behavior
Should not call docker on the puppet server via a function.
Steps to Reproduce
Steps to reproduce the behavior:
- Set up a puppet server and puppet agent on distinct hosts
- Create manifest for agent containing a
docker::run
type withrestart => no
- When compilation occurs
docker_params_changed
is called - Ruby function will shell out to docker call which fails as command not present and it's the wrong host anyway.
Environment
- Version 5.5.19
- Platform CentOS 7
Additional Context
Add any other context about the problem here.
Situation introduced with #648