Closed epgkue closed 1 year ago
I've not tested os_patching on alma yet, but sounds like that could be the culprit. We've also seen some issues using open source puppet with os_patching
(I was designed to work with PE). I'll try and run up a test environment and see what I can find.
I've not been able to replicate this:
I've tried a few different combos, but no issues.
I did the following with a bare Alma instance:
rpm -Uvh https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
yum install puppet-agent
puppet module install albatrossflavour/os_patching
puppet apply -e 'include os_patching'
bash -x /usr/local/bin/os_patching_fact_generation.sh
Did I miss anything?
@epgkue do you have any other steps I can try to reproduce this?
At least on my CentOS 7 machines, this seems to be the same issue as seen in #202 - one of my packages does not have an "ensure" parameter in the catalog, causing the array access to fail.
While this was fixed with #203, the patch seems to have been overwritten and is not in the current development branch or release. I'd suggest to re-apply #203.
Well spotted @dirkonet . I've applied the fix to development and will release an update soon.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
.... ++ /opt/puppetlabs/puppet/bin/ruby -e 'require '\''json'\''; json_hash = JSON.parse(ARGF.read); json_hash['\''resources'\''].select { |r| r['\''type'\''] == '\''Package'\'' and r['\''parameters'\'']['\''ensure'\''].match /\d.+/ }.each do | m | puts m['\''title'\''] end' Traceback (most recent call last): 2: from -e:1:in
<main>' 1: from -e:1:in
select' -e:1:inblock in <main>': undefined method
match' for nil:NilClass (NoMethodError) ....What behaviour did you expect instead
Updating os_patching facts to the Hosts to Foreman.
Any additional information you'd like to impart