Page MenuHomeSoftware Heritage

Prometheus manifest breaks puppet on brand new nodes
Closed, ResolvedPublic

Description

I have just seen this error while trying to run Puppet for the first time on a brand new VM:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /etc/puppet/code/environments/production/site-modules/profile/manifests/prometheus/apt_config.pp:3:6 on node logstash0.internal.softwareheritage.org

Event Timeline

ftigeot created this task.Jul 27 2018, 4:29 PM
ftigeot added a comment.EditedJul 27 2018, 4:31 PM

It is caused by this piece of code in site-modules/profile/manifests/prometheus/apt_config.pp

if $facts['os']['distro']['codename'] == 'stretch' {

Commenting the corresponding code block out allows the Puppet agent to run successfully.

Content of $facts['os'] on the problematic host:

os => {"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"9", "minor"=>"5", "full"=>"9.5"}, "lsb"=>{"distcodename"=>"stretch", "distid"=>"Debian", "distdescription"=>"Debian GNU/Linux 9.5 (stretch)", "distrelease"=>"9.5", "majdistrelease"=>"9", "minordistrelease"=>"5"}}
olasd added a subscriber: olasd.Jul 27 2018, 4:35 PM

This (and other manifests) needs facter to be installed from stretch-backports. The azure provision-vm.sh script is supposed to do this.

ftigeot closed this task as Resolved.Jul 27 2018, 4:56 PM
ftigeot claimed this task.

The issue was not visible on an Azure VM but a Proxmox one.

It should now be resolved by rSPSITE78742ed60210 .