Page MenuHomeSoftware Heritage

Prometheus manifest breaks puppet on brand new nodes
Closed, MigratedEdits Locked

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

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"}}

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

ftigeot claimed this task.

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

It should now be resolved by rSPSITE78742ed60210 .