puppetlabs-apache
puppetlabs-apache copied to clipboard
Incorrect Type Passed to confd_command in init.pp
https://github.com/puppetlabs/puppetlabs-apache/blob/3b4bae8dbac8081e241d3049a520cc953705ceb5/manifests/init.pp#L640
Error: Parameter command failed on Exec[mkdir /opt/rh/httpd24/root/etc/httpd/conf.d]: Command must be a String, got value of class Array (file: /etc/puppetlabs/code/environments/production/modules/apache/manifests/init.pp, line: 639)
This was introduced with commit 419078920b03900979e3d4b6a893c55f17a03b56. It's seems that all exec statements from the commit are broken by using Arrays for the commands if the puppet version is < 6.24. In puppet version 6.24 command as exec was introduced (https://puppet.com/docs/puppet/6/release_notes_puppet.html#enhancements_puppet_x-7-9-0-PUP-5704).
The puppetlabs apache should support puppet > 6.0.0 but fails for all version before 6.24.
Good find @trefzer! I wasn't aware it was so late in the 6.x series. I mentioned in https://github.com/puppetlabs/puppetlabs-apache/pull/2321#discussion_r981032335 I thought it was too big for a patch release, but wasn't aware it was this big.
I'm able to reproduce this issue with Puppet 7 on CentOS 8 agent (not yet converted to CentOS 8 streams). On agent side:
$ puppet --version 7.5.0 $ which puppet /opt/puppetlabs/bin/puppet $ rpm -qa|grep puppet puppet-agent-7.5.0-1.el8.x86_64 puppet7-release-7.0.0-2.el8.noarch
The server-side looks like this:
$ puppetserver --version puppetserver version: 7.9.2 $ puppet --version 7.20.0 $ dpkg -s puppetserver |grep ^Version: Version: 7.9.2-1focal dpkg -s puppetserver |grep ^Maintainer: Maintainer: Puppet Labs
The error message is the same:
Error: Failed to apply catalog: Parameter command failed on Exec[mkdir /etc/httpd/conf.d]: Command must be a String, got value of class Array (file: /etc/puppetlabs/code/environments/www_php82/modules/apache/manifests/init.pp, line: 639)
This is with the latest released version of puppetlabs-apache (8.3.0).
@mattock That, shouldn't be happening. The functionality to accept commands as arrays was added in 6.24 forward. It may be a bug on the agent side.
In regards to the larger issue, plans to bump the required version and do a major release are underway, Apache is simply held up by our wish to get the Apache 2.2 removal work done at the same time.
If at all possible could you submit a debug log so we can better see what is happening.
@david22swan actually, I think we must either revert the change or declare the minimum version to be 6.24. I've opened https://github.com/puppetlabs/puppetlabs-apache/pull/2342 to declare the minimum version correctly.
@ekohl Declaring the minimum version is what I meant by bumping the required version