Page MenuHomePhabricator

Puppet compiler failure to lookup some keys
Closed, ResolvedPublic

Description

From https://gerrit.wikimedia.org/r/#/c/392564/7 we have the following behavior. For some reason the compiler can not lookup a key

From [1]

Error: Failed to compile catalog for node ganeti1001.eqiad.wmnet: Evaluation Error: Error while evaluating a Function Call, Could not find data item profile::ganeti::ganeti01.svc.eqiad.wmnet::nodes in any Hiera data file and no default supplied at /srv/jenkins-workspace/puppet-compiler/9768/change/src/modules/profile/manifests/ganeti.pp:4:21 on node ganeti1001.eqiad.wmnet

However the change applied fine in production and the keys are looked up just fine.

This is irrelevant of the change as seen in [2]

Error: Failed to compile catalog for node ganeti1001.eqiad.wmnet: Evaluation Error: Error while evaluating a Function Call, Could not find data item ganeti::ganeti01.svc.eqiad.wmnet::nodes in any Hiera data file and no default supplied at /srv/jenkins-workspace/puppet-compiler/9768/production/src/modules/role/manifests/ganeti.pp:44:25 on node ganeti1001.eqiad.wmnet

./utils/hiera_lookup does give a hint, which might be related or not

./utils/hiera_lookup -v --fqdn=ganeti1001.eqiad.wmnet --roles=ganeti ganeti::ganeti01.svc.eqiad.wmnet::nodes
...
Searching in file /home/alex/wikimedia/gerrit/puppet/production/hieradata/role/eqiad/ganeti.yaml for ganeti::ganeti01

namely that . there might be the cause of the issue. That being said, hiera_lookup is a tool we wrote from scratch so that might just be an unrelated bug.

[1] http://puppet-compiler.wmflabs.org/9768/ganeti1001.eqiad.wmnet/change.ganeti1001.eqiad.wmnet.err
[2] http://puppet-compiler.wmflabs.org/9768/ganeti1001.eqiad.wmnet/prod.ganeti1001.eqiad.wmnet.err

Event Timeline

akosiaris added projects: Puppet, Puppet CI, SRE.
akosiaris added subscribers: Dzahn, Joe, Volans.

Triaging as high as this might bite us and cause issues. We should investigate more and act accordingly

fgiunchedi subscribed.

I've experienced the same with hiera 3 and a puppet master on stretch, likely related to "segmented keys" lookups

"the change applied fine in production and the keys are looked up just fine", actually I saw this change fail yesterday on production? Check logs for puppet failures.

fgiunchedi claimed this task.

Things work as expected nowadays:

$ ./utils/hiera_lookup -v --fqdn=ganeti1001.eqiad.wmnet --roles=ganeti profile::ganeti::ganeti01.svc.eqiad.wmnet::nodes
... variable found as expected

Also PCC works! Resolving