deployment-prep uses a standalone puppetmaster, when cherry picking a patch that affects hieradata the change is not reflected.
I have cherry picked https://gerrit.wikimedia.org/r/c/operations/puppet/+/672658/ on deployment-puppetmaster04.deployment-prep.eqiad.wmflabs which adds:
profile::java::java_packages: - version: 11 variant: jre-headless
The new value is not found, it ends up to fallback on the default: []
Puppet hierarchy is:
version: 5 defaults: datadir: /etc/puppet/hieradata data_hash: yaml_data hierarchy: - name: 'Http Yaml' data_hash: cloudlib::httpyaml uri: "http://puppetmaster.cloudinfra.wmflabs.org:8100/v1/%{::labsproject}/node/%{facts.fqdn}" - name: "cloud hierarchy" paths: - "cloud/%{::wmcs_deployment}/%{::labsproject}/hosts/%{::hostname}.yaml" - "cloud/%{::wmcs_deployment}/%{::labsproject}/common.yaml" - "cloud/%{::wmcs_deployment}.yaml" - "cloud.yaml" - name: "Secret hierarchy" path: "%{::labsproject}.yaml" datadir: "/etc/puppet/secret/hieradata" - name: "Private hierarchy" paths: - "labs/%{::labsproject}/common.yaml" - "%{::labsproject}.yaml" - "labs.yaml" datadir: "/etc/puppet/private/hieradata" - name: "Common hierarchy" path: "common.yaml" - name: "Secret Common hierarchy" path: "common.yaml" datadir: "/etc/puppet/secret/hieradata" - name: "Private Common hierarchy" path: "common.yaml" datadir: "/etc/puppet/private/hieradata"
If I look it up on deployment-puppetmaster04:
Warning: Undefined variable 'puppetmaster'; \n (file & line not available) Warning: Unknown variable: 'profile::backup::host::jobdefaults'. (file: /etc/puppet/modules/backup/manifests/set.pp, line: 10, column: 33) Warning: Unknown variable: 'profile::backup::host::jobdefaults'. (file: /etc/puppet/modules/backup/manifests/set.pp, line: 10, column: 33) Searching for "profile::java::java_packages" Global Data Provider (hiera configuration version 5) Using configuration "/etc/puppet/hiera.yaml" Hierarchy entry "Http Yaml" URI "http://puppetmaster.cloudinfra.wmflabs.org:8100/v1/deployment-prep/node/deployment-deploy01.deployment-prep.eqiad.wmflabs" Original uri: "http://puppetmaster.cloudinfra.wmflabs.org:8100/v1/%{::labsproject}/node/%{facts.fqdn}" No such key: "profile::java::java_packages" Hierarchy entry "cloud hierarchy" Path "/etc/puppet/hieradata/cloud/eqiad1/deployment-prep/hosts/deployment-deploy01.yaml" Original path: "cloud/%{::wmcs_deployment}/%{::labsproject}/hosts/%{::hostname}.yaml" Path not found Path "/etc/puppet/hieradata/cloud/eqiad1/deployment-prep/common.yaml" Original path: "cloud/%{::wmcs_deployment}/%{::labsproject}/common.yaml" No such key: "profile::java::java_packages" Path "/etc/puppet/hieradata/cloud/eqiad1.yaml" Original path: "cloud/%{::wmcs_deployment}.yaml" No such key: "profile::java::java_packages" Path "/etc/puppet/hieradata/cloud.yaml" Original path: "cloud.yaml" Found key: "profile::java::java_packages" value: []
Or in other words, it does not seem to search /etc/hieradata/common.
Apparently caused by the migration to hiera 5 https://gerrit.wikimedia.org/r/c/operations/puppet/+/615159 by @jbond , previously we had:
defaults: datadir: /etc/puppet/hieradata :hierarchy: ... - "common" ...
I guess if the patch is merged, the lookup will be found via puppetmaster.cloudinfra.wmflabs.org
The workaround for the cherry-pick to work would be to use the generic /etc/puppet/hieradata/cloud.yaml instead of /etc/puppet/hieradata/common/profile/ci/slave/labs/common.yaml .