Page MenuHomePhabricator

puppet-catalog-compiler: new feature to report hiera interaction
Open, LowPublic

Description

The puppet-catalog-compiler tool is great. This task tries to describe a new feature that I think would be great to have to improve even more the usefulness of this tool.

Description:

The catalog compiler should print/output/report (somehow) the interactions with hiera, for lookup operations in concrete.
I would like to have more information on 2 questions:

  • which hiera keys were used to build a catalog?

The answer to this question is a list of key/values as returned by hiera, those used to build the catalog:

profile:xxx::key1: value1
profile:xxx::key2: value2
profile:xxx::key3: value3
[...]
  • where did hiera find those keys?

We already have similar feature in the utils/hiera_lookuptool, which prints exactly where hiera found a given key for a given role.

Use cases:

My main uses cases are from the WMCS point of view.

We rely on hiera a lot for building our CloudVPS/Toolforge services, for Openstack roles/profiles and for SonOfGridEngine/Kubernetes roles/profiles.
As we extend our services and handle upgrades of the different software stacks, hiera management is becoming more complex every day.
We need to have a crystal clear view of how hiera is behaving in the different datacenters/deployments/roles/profiles/components we have.

Also, another interesting use case, is when testing production HW roles/profiles in CloudVPS VM instances, i.e, applying a role/profile in a VM instance which is originally meant for production HW, for testing/developing purposes.
Since hiera keys aren't set in ops/puppet.git for CloudVPS VM instances, but in horizon or other places, this requires a lot guessing and back-and-forth until you know all required hiera keys to build the catalog. We need to know all hiera keys in use by the given role/profile and manually enter them in horizon, since currently most profiles don't contain default values.

In addition, I believe all OpsEng/SRE people from the WMF working with ops/puppet.git can benefit of this new feature, not only WMCS, because they may have similar use cases.

The process for getting information about how hiera is behaving can be done manually, but is currently tedious. Automating it, for example in a puppet-catalog-compiler report could speed up our work a lot.

Output proposal:

Right now the puppet catalog compiler, as used from jenkins (https://integration.wikimedia.org/ci/view/operations/job/operations-puppet-catalog-compiler/), outputs several files related to the catalog compilation job:

Relevant files

    Production catalog
    Change catalog
    Production errors/warnings
    Change errors/warnings

I would suggest having several more files:

Relevant files

    Production catalog
    Change catalog
    Production errors/warnings
    Change errors/warnings
    + Production hiera keys
    + Change hiera keys
    + Production hiera lookup information
    + Change hiera lookup information

The Production hiera keys file contains a simple text file containing all hiera keys used for building the production catalog (ie, before the patch). Likewise, the Change hiera keys references the changed catalog:

profile:xxx::key1: value1
profile:xxx::key2: value2
profile:xxx::key3: value3
[...]

Ideally, a diff will be auto-generated as well.

The Production hiera lookup information file contains an output similar to utils/hiera_lookup for each hiera key used to build the production catalog. Same for Change hiera lookup information.

Event Timeline

i did a quick and dirty run to see what this might look like and here is the first pass. it seems quite difficult from the basic logging output to get the context for where the lookup is happening. without that im not sure how usefull this is. id recomend testing the the debug_host command used below on one of the pcc-worker hosts and seeing what from that ourput is useful and notice how big the hiera lookup output actually is

$ python3 -m puppet_compiler.debug_host -c 852995 cumin2002.codfw.wmnet | grep 'Found key:' 
   Found key: "lookup_options" value: {
          Found key: "wikimail_smarthost" value: [
          Found key: "mail_smarthost" value: [
          Found key: "acmechief_host" value: "acmechief1001.eqiad.wmnet"
          Found key: "ntp_peers" value: {
          Found key: "profile::base::production::enable" value: true
          Found key: "profile::base::production::enable_ip6_mapped" value: true
          Found key: "profile::netbox::host::status" value: "active"
          Found key: "profile::netbox::host::location" value: {
          Found key: "profile::base::remote_syslog_send_logs" value: "standard"
          Found key: "profile::base::overlayfs" value: false
          Found key: "profile::base::enable_contacts" value: true
          Found key: "profile::base::core_dump_pattern" value: "/var/tmp/core/core.%h.%e.%p.%t"
          Found key: "profile::base::unprivileged_userns_clone" value: false
          Found key: "profile::base::remote_syslog" value: []
          Found key: "profile::base::remote_syslog_tls" value: {
          Found key: "wikimedia_clusters" value: {
          Found key: "cluster" value: "management"
          Found key: "profile::puppet::agent::interval" value: 30
          Found key: "profile::puppet::agent::enable_puppet7" value: false
          Found key: "profile::puppet::agent::environment" value: "production"
          Found key: "profile::puppet::agent::serialization_format" value: "json"
          Found key: "profile::puppet::agent::dns_alt_names" value: []
          Found key: "profile::puppet::agent::certificate_revocation" value: nil
          Found key: "puppetmaster" value: "puppet"
          Found key: "puppet_ca_server" value: "puppetmaster1001.eqiad.wmnet"
          Found key: "puppet_ca_source" value: "puppet:///modules/profile/puppet/ca.production.pem"
          Found key: "manage_puppet_ca_file" value: true
          Found key: "profile::puppet::agent::certificate_revocation" value: nil
          Found key: "profile::puppet::client_bucket::ensure" value: "present"
          Found key: "profile::puppet::client_bucket::file_age" value: 14
          Found key: "profile::puppet::client_bucket::max_size" value: "100M"
          Found key: "profile::base::certificates::puppet_ca_content" value: {}
          Found key: "profile::base::certificates::include_bundle_jks" value: false
          Found key: "profile::base::certificates::trusted_certs" value: {
          Found key: "puppetmaster" value: "puppet"
          Found key: "profile::apt::purge_sources" value: true
          Found key: "profile::apt::purge_preferences" value: true
          Found key: "profile::apt::use_proxy" value: true
          Found key: "profile::apt::manage_apt_source" value: true
          Found key: "profile::apt::install_audit_installed" value: true
          Found key: "profile::apt::mirror" value: "mirrors.wikimedia.org"
          Found key: "profile::apt::use_private_repo" value: true
          Found key: "profile::systemd::timesyncd::ensure" value: "present"
          Found key: "profile::systemd::timesyncd::ntp_servers" value: [
          Found key: "profile::resolving::timeout" value: 1
          Found key: "profile::resolving::ndots" value: 1
          Found key: "profile::resolving::attempts" value: 3
          Found key: "profile::resolving::disable_resolvconf" value: false
          Found key: "profile::resolving::disable_dhcpupdates" value: false
              Found key: "facts" value: {
              Found key: "networking" value: {
              Found key: "domain" value: "codfw.wmnet"
          Found key: "profile::resolving::domain_search" value: [
          Found key: "profile::resolving::nameservers" value: [
          Found key: "profile::mail::default_mail_relay::enabled" value: true
          Found key: "profile::mail::default_mail_relay::template" value: "profile/mail/default_mail_relay/exim4.minimal.production.erb"
          Found key: "profile::environment::ls_aliases" value: true
          Found key: "profile::environment::export_systemd_env" value: true
          Found key: "profile::environment::editor" value: "vim"
          Found key: "profile::environment::custom_skel_bashrc" value: nil
          Found key: "profile::environment::custom_skel_zshrc" value: nil
          Found key: "profile::environment::custom_bashrc" value: nil
          Found key: "profile::environment::profile_scripts" value: {
          Found key: "profile::environment::variables" value: {}
          Found key: "profile::environment::custom_skel_bashrc" value: nil
          Found key: "profile::environment::custom_skel_zshrc" value: nil
          Found key: "profile::environment::custom_bashrc" value: nil
          Found key: "profile::ssh::client::manage_ssh_keys" value: true
          Found key: "profile::ssh::client::manage_ssh_config" value: true
          Found key: "profile::ssh::client::hash_known_hosts" value: true
          Found key: "profile::ssh::client::gss_api_authentication" value: true
          Found key: "profile::ssh::client::gss_api_delegate_credentials" value: false
          Found key: "profile::ssh::client::send_env" value: []
          Found key: "profile::ssh::server::listen_port" value: 22
          Found key: "profile::ssh::server::listen_addresses" value: []
          Found key: "profile::ssh::server::permit_root" value: true
          Found key: "profile::ssh::server::authorized_keys_file" value: [
          Found key: "profile::ssh::server::authorized_keys_command" value: "/usr/sbin/ssh-key-ldap-lookup"
          Found key: "profile::ssh::server::disable_nist_kex" value: true
          Found key: "profile::ssh::server::explicit_macs" value: true
          Found key: "profile::ssh::server::enable_hba" value: false
          Found key: "profile::ssh::server::enable_kerberos" value: false
          Found key: "profile::ssh::server::disable_agent_forwarding" value: true
          Found key: "profile::ssh::server::challenge_response_auth" value: true
          Found key: "profile::ssh::server::max_sessions" value: nil
          Found key: "profile::ssh::server::max_startups" value: nil
          Found key: "profile::ssh::server::gateway_ports" value: false
          Found key: "profile::ssh::server::accept_env" value: []
          Found key: "profile::ssh::server::max_sessions" value: nil
          Found key: "profile::ssh::server::max_startups" value: nil
          Found key: "profile::debdeploy::client::ensure" value: "present"
          Found key: "profile::debdeploy::client::exclude_mounts" value: []
          Found key: "profile::debdeploy::client::exclude_filesystems" value: []
              Found key: "profile::debdeploy::client::filter_services" value: {
          Found key: "profile::auto_restarts::with_debdeploy" value: true
          Found key: "profile::admin::groups" value: [
          Found key: "profile::admin::groups_no_ssh" value: []
          Found key: "profile::admin::always_groups" value: [
          Found key: "profile::admin::purge_sudoers_d" value: false
          Found key: "profile::admin::managehome" value: false
          Found key: "profile::admin::managelingering" value: false
          Found key: "profile::pki::client::ensure" value: "present"
          Found key: "profile::pki::client::signer_host" value: "pki.discovery.wmnet"
          Found key: "profile::pki::client::signer_port" value: 443
          Found key: "profile::pki::client::auth_key" value: "aaaabbbbccccdddd"
          Found key: "profile::pki::client::enable_proxy" value: false
          Found key: "profile::pki::client::listen_addr" value: "127.0.0.1"
          Found key: "profile::pki::client::listen_port" value: 8888
          Found key: "profile::pki::client::bundles_source" value: "puppet:///modules/profile/pki/intermediates"
          Found key: "profile::pki::client::root_ca_cn" value: "Wikimedia_Internal_Root_CA"
          Found key: "profile::pki::client::root_ca_source" value: nil
              Found key: "facts" value: {
              Found key: "puppet_config" value: {
              Found key: "hostcert" value: "/var/lib/puppet/ssl/certs/cumin2002.codfw.wmnet.pem"
          Found key: "profile::pki::client::mutual_tls_client_cert" value: "/var/lib/puppet/ssl/certs/cumin2002.codfw.wmnet.pem"
              Found key: "facts" value: {
              Found key: "puppet_config" value: {
              Found key: "hostprivkey" value: "/var/lib/puppet/ssl/private_keys/cumin2002.codfw.wmnet.pem"
          Found key: "profile::pki::client::mutual_tls_client_key" value: "/var/lib/puppet/ssl/private_keys/cumin2002.codfw.wmnet.pem"
              Found key: "facts" value: {
              Found key: "puppet_config" value: {
              Found key: "localcacert" value: "/var/lib/puppet/ssl/certs/ca.pem"
          Found key: "profile::pki::client::tls_remote_ca" value: "/var/lib/puppet/ssl/certs/ca.pem"
          Found key: "profile::pki::client::tls_remote_ca_source" value: nil
          Found key: "profile::pki::client::certs" value: {}
          Found key: "profile::pki::client::root_ca_source" value: nil
          Found key: "profile::pki::client::tls_remote_ca_source" value: nil
          Found key: "profile::contacts::role_contacts" value: [
          Found key: "profile::base::netbase::manage_etc_services" value: true
          Found key: "profile::base::netbase::extra_services" value: {}
          Found key: "netbase::default_services" value: {
          Found key: "profile::logoutd::owner" value: "root"
          Found key: "profile::logoutd::group" value: "root"
          Found key: "profile::logoutd::scripts" value: {}
          Found key: "cluster" value: "management"
          Found key: "cumin_masters" value: [
          Found key: "profile::debmonitor::client::ensure" value: "present"
          Found key: "profile::debmonitor::client::ssl_ca" value: "cfssl"
          Found key: "profile::debmonitor::client::ssl_ca_label" value: "debmonitor"
          Found key: "debmonitor" value: "debmonitor.discovery.wmnet"
          Found key: "profile::monitoring::hardware_monitoring" value: "present"
            Found key: "contactgroups" value: "admins"
                    Found key: "contactgroups" value: "admins"
          Found key: "profile::monitoring::contact_group" value: "admins"
            Found key: "mgmt_contactgroups" value: "admins"
                    Found key: "mgmt_contactgroups" value: "admins"
          Found key: "profile::monitoring::mgmt_contact_group" value: "admins"
            Found key: "cluster" value: "management"
                    Found key: "cluster" value: "management"
          Found key: "profile::monitoring::cluster" value: "management"
          Found key: "profile::monitoring::is_critical" value: false
          Found key: "profile::monitoring::monitor_systemd" value: true
          Found key: "profile::monitoring::nrpe_check_disk_options" value: "-w 6% -c 3% -W 6% -K 3% -l -e -A -i \"/srv/sd[a-b][1-3]\" -i \"/srv/nvme[0-9]n[0-9]p[0-9]\" --exclude-type=fuse.fuse_dfs --exclude-type=tracefs"
          Found key: "profile::monitoring::nrpe_check_disk_critical" value: false
          Found key: "profile::monitoring::raid_check" value: true
          Found key: "profile::monitoring::raid_check_interval" value: 10
          Found key: "profile::monitoring::raid_retry_interval" value: 10
          Found key: "profile::monitoring::notifications_enabled" value: true
            Found key: "do_paging" value: true
                    Found key: "do_paging" value: true
          Found key: "profile::monitoring::do_paging" value: true
            Found key: "cluster" value: "management"
                      Found key: "cluster" value: "management"
                Found key: "::site" value: "codfw"
            Found key: "nagios_group" value: "management_codfw"
                              Found key: "cluster" value: "management"
                        Found key: "::site" value: "codfw"
                    Found key: "nagios_group" value: "management_codfw"
          Found key: "profile::monitoring::nagios_group" value: "management_codfw"
          Found key: "profile::monitoring::mgmt_parents" value: {
          Found key: "profile::monitoring::services" value: {
            Found key: "profile::monitoring::is_critical" value: false
              Found key: "facts" value: {
              Found key: "hostname" value: "cumin2002"
                    Found key: "profile::monitoring::is_critical" value: false
          Found key: "profile::monitoring::hosts" value: {
            Found key: "monitoring_hosts" value: [
                    Found key: "monitoring_hosts" value: [
          Found key: "profile::monitoring::monitoring_hosts" value: [
          Found key: "profile::monitoring::raid_write_cache_policy" value: nil
          Found key: "profile::monitoring::raid_write_cache_policy" value: nil
          Found key: "profile::prometheus::nic_saturation_exporter::ensure" value: "present"
          Found key: "profile::rsyslog::kafka_shipper::enable" value: true
          Found key: "profile::rsyslog::kafka_queue_enabled_sites" value: [
          Found key: "profile::rsyslog::kafka_destination_clusters" value: {
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
          Found key: "profile::base::firewall::enable_logging" value: true
          Found key: "profile::base::firewall::block_abuse_nets" value: true
          Found key: "profile::base::firewall::default_reject" value: false
          Found key: "profile::base::firewall::defs_from_etcd" value: false
          Found key: "conftool_prefix" value: "/conftool/v1"
          Found key: "monitoring_hosts" value: [
          Found key: "cumin_masters" value: [
          Found key: "bastion_hosts" value: [
          Found key: "cache_hosts" value: [
          Found key: "kafka_brokers_main" value: [
          Found key: "kafka_brokers_jumbo" value: [
          Found key: "kafka_brokers_logging" value: [
          Found key: "zookeeper_hosts_main" value: [
          Found key: "druid_public_hosts" value: [
          Found key: "labstore_hosts" value: [
          Found key: "mysql_root_clients" value: [
          Found key: "deployment_hosts" value: [
          Found key: "prometheus_nodes" value: [
          Found key: "abuse_networks" value: {
          Found key: "profile::base::firewall::log::log_burst" value: 5
          Found key: "profile::base::firewall::log::log_rate" value: "1/second"
          Found key: "profile::base::firewall::log::separate_file" value: true
          Found key: "profile::spicerack::peeringdb_temp_dir" value: "/tmp/peeringdb-cache"
          Found key: "profile::spicerack::firmware_store_dir" value: "/srv/firmware"
          Found key: "tcpircbot_host" value: "icinga.wikimedia.org"
          Found key: "tcpircbot_port" value: 9200
                Found key: "::site" value: "codfw"
            Found key: "http_proxy_host" value: "webproxy.codfw.wmnet"
                Found key: "::site" value: "codfw"
            Found key: "http_proxy_host" value: "webproxy.codfw.wmnet"
            Found key: "http_proxy_port" value: 8080
                        Found key: "::site" value: "codfw"
                    Found key: "http_proxy_host" value: "webproxy.codfw.wmnet"
                    Found key: "http_proxy_port" value: 8080
          Found key: "http_proxy" value: "http://webproxy.codfw.wmnet:8080"
          Found key: "netbox_api_url" value: "https://netbox.discovery.wmnet/"
          Found key: "redis::shards" value: {
          Found key: "profile::netbox::ro_token" value: "DUMMYREADONLYTOKEN"
          Found key: "profile::netbox::rw_token" value: "DUMMYREADWRITETOKEN"
          Found key: "profile::ganeti::rapi::ro_user" value: "ro_user"
          Found key: "profile::ganeti::rapi::ro_password" value: "dummydummydummy"
          Found key: "profile::spicerack::ganeti_rapi_timeout" value: 30
          Found key: "profile::spicerack::peeringdb_ro_token" value: "secrettoken"
          Found key: "profile::conftool::client::etcd_user" value: "root"
              Found key: "::site" value: "codfw"
          Found key: "etcd_client_srv_domain" value: "conftool.codfw.wmnet"
          Found key: "conftool_prefix" value: "/conftool/v1"
          Found key: "tcpircbot_host" value: "icinga.wikimedia.org"
          Found key: "tcpircbot_port" value: 9200
          Found key: "etcd_host" value: nil
          Found key: "etcd_port" value: nil
          Found key: "etcd::autogen_pwd_seed" value: "21}@/"
          Found key: "profile::cumin::master::email_alerts" value: true
          Found key: "puppetdb_host" value: "puppetdb2002.codfw.wmnet"
          Found key: "datacenters" value: [
          Found key: "kerberos_kadmin_server_primary" value: "krb1001.eqiad.wmnet"
          Found key: "profile::cumin::monitor_agentrun" value: true
          Found key: "profile::cumin::monitoring_agentrun::warn" value: 1
          Found key: "profile::cumin::monitoring_agentrun::crit" value: 20
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
          Found key: "kafka_clusters" value: {
          Found key: "zookeeper_clusters" value: {
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
              Found key: "::site" value: "codfw"
          Found key: "service::catalog" value: {
          Found key: "profile::homer::private_git_peer" value: "cumin1001.eqiad.wmnet"
          Found key: "profile::homer::diff_timer_interval" value: "*-*-* 20:35:00"
          Found key: "profile::netbox::ro_token" value: "DUMMYREADONLYTOKEN"
          Found key: "netbox_api_url" value: "https://netbox.discovery.wmnet/"
          Found key: "profile::spicerack::reposync::ensure" value: "present"
          Found key: "profile::spicerack::reposync::repos" value: [
          Found key: "profile::spicerack::reposync::remotes" value: []
          Found key: "profile::httpbb::hourly_tests" value: {
            Found key: "kubernetes_docker_password" value: "somepassword2"
                    Found key: "kubernetes_docker_password" value: "somepassword2"
          Found key: "profile::httpbb::basicauth_credentials" value: {
          Found key: "profile::mariadb::wmfmariadbpy::role" value: "admin"
          Found key: "profile::mariadb::section_ports" value: {
          Found key: "http_proxy" value: "http://webproxy.codfw.wmnet:8080"
          Found key: "profile::sre::os_reports::host" value: "cumin2002.codfw.wmnet"
          Found key: "rsync::server::wrap_with_stunnel" value: false
          Found key: "profile::sre::check_user::super_admin" value: "admin@example.org"
            Found key: "http_proxy" value: "http://webproxy.codfw.wmnet:8080"
                    Found key: "http_proxy" value: "http://webproxy.codfw.wmnet:8080"
          Found key: "profile::sre::check_user::proxy_server" value: "http://webproxy.codfw.wmnet:8080"
          Found key: "profile::sre::check_user::service_file" value: "gsuite/mail_serviceaccount.json"
          Found key: "kubernetes_cluster_groups" value: {
          Found key: "profile::kubernetes::infrastructure_users" value: {
          Found key: "profile::backup::enable" value: true
          Found key: "profile::backup::pool" value: "productionEqiad"
          Found key: "profile::backup::director" value: "backup1001.eqiad.wmnet"
          Found key: "profile::backup::days" value: [
          Found key: "profile::backup::director_seed" value: "changeme"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "contactgroups" value: "admins"
          Found key: "rsync::server::wrap_with_stunnel" value: false
          Found key: "rsync::server::wrap_with_stunnel" value: false

adding here the full output of a specific found key (we get a block similar to this for each line above)

Debug: Lookup of 'rsync::server::wrap_with_stunnel'
  Searching for "rsync::server::wrap_with_stunnel"
    Global Data Provider (hiera configuration version 5)
      Using configuration "/tmp/fill-puppetdby9zwm819/1/change/src/hiera.yaml"
      Hierarchy entry "private node"
        Path "/tmp/fill-puppetdby9zwm819/1/change/private/hieradata/hosts/cumin2002.yaml"
          Original path: "hosts/%{::hostname}.yaml"
          Path not found
      Hierarchy entry "node hierarchy"
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/hosts/cumin2002.yaml"
          Original path: "hosts/%{::hostname}.yaml"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "netbox node hierarchy"
        Path "/tmp/fill-puppetdby9zwm819/1/change/netbox-hiera/hosts/cumin2002.yaml"
          Original path: "hosts/%{::hostname}.yaml"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "Regex lookup"
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/regex.yaml"
          Original path: "regex.yaml"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "role"
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/role/codfw/cluster/management.yaml"
          Original path: "role/%{::site}/%{::_role}.yaml"
          Path not found
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/role/common/cluster/management.yaml"
          Original path: "role/common/%{::_role}.yaml"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "private role"
        Path "/tmp/fill-puppetdby9zwm819/1/change/private/hieradata/role/codfw/cluster/management.yaml"
          Original path: "role/%{::site}/%{::_role}.yaml"
          Path not found
        Path "/tmp/fill-puppetdby9zwm819/1/change/private/hieradata/role/common/cluster/management.yaml"
          Original path: "role/common/%{::_role}.yaml"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "private site"
        Path "/tmp/fill-puppetdby9zwm819/1/change/private/hieradata/codfw"
          Original path: "%{::site}"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "expand_path site"
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/codfw"
          Original path: "%{::site}"
          No such key: "rsync::server::wrap_with_stunnel"
      Hierarchy entry "common"
        Path "/tmp/fill-puppetdby9zwm819/1/change/src/hieradata/common"
          Original path: "common"
          Found key: "rsync::server::wrap_with_stunnel" value: false

im also curious if you find the catlog files useful, i was thinking about proposing dropping theses as they are responsible for about 99% of the storage usage of pcc and i had assumed that they where probably not used by most if at all, especially with the fulldiff output?

sorted an uniqued, i think this is close to what you where wanting for the keys file? (of course we would need the real list, dict values)

$ python3 -m puppet_compiler.debug_host -c 852995 cumin2002.codfw.wmnet 2>&1 | grep 'Found key:'  | awk '{$1=$1};1' | sort -u
Found key: "abuse_networks" value: {
Found key: "acmechief_host" value: "acmechief1001.eqiad.wmnet"
Found key: "bastion_hosts" value: [
Found key: "cache_hosts" value: [
Found key: "cluster" value: "management"
Found key: "conftool_prefix" value: "/conftool/v1"
Found key: "contactgroups" value: "admins"
Found key: "cumin_masters" value: [
Found key: "datacenters" value: [
Found key: "debmonitor" value: "debmonitor.discovery.wmnet"
Found key: "deployment_hosts" value: [
Found key: "domain" value: "codfw.wmnet"
Found key: "do_paging" value: true
Found key: "druid_public_hosts" value: [
Found key: "etcd::autogen_pwd_seed" value: "21}@/"
Found key: "etcd_client_srv_domain" value: "conftool.codfw.wmnet"
Found key: "etcd_host" value: nil
Found key: "etcd_port" value: nil
Found key: "facts" value: {
Found key: "hostcert" value: "/var/lib/puppet/ssl/certs/cumin2002.codfw.wmnet.pem"
Found key: "hostname" value: "cumin2002"
Found key: "hostprivkey" value: "/var/lib/puppet/ssl/private_keys/cumin2002.codfw.wmnet.pem"
Found key: "http_proxy_host" value: "webproxy.codfw.wmnet"
Found key: "http_proxy_port" value: 8080
Found key: "http_proxy" value: "http://webproxy.codfw.wmnet:8080"
Found key: "kafka_brokers_jumbo" value: [
Found key: "kafka_brokers_logging" value: [
Found key: "kafka_brokers_main" value: [
Found key: "kafka_clusters" value: {
Found key: "kerberos_kadmin_server_primary" value: "krb1001.eqiad.wmnet"
Found key: "kubernetes_cluster_groups" value: {
Found key: "kubernetes_docker_password" value: "somepassword2"
Found key: "labstore_hosts" value: [
Found key: "localcacert" value: "/var/lib/puppet/ssl/certs/ca.pem"
Found key: "lookup_options" value: {
Found key: "mail_smarthost" value: [
Found key: "manage_puppet_ca_file" value: true
Found key: "mgmt_contactgroups" value: "admins"
Found key: "monitoring_hosts" value: [
Found key: "mysql_root_clients" value: [
Found key: "nagios_group" value: "management_codfw"
Found key: "netbase::default_services" value: {
Found key: "netbox_api_url" value: "https://netbox.discovery.wmnet/"
Found key: "networking" value: {
Found key: "ntp_peers" value: {
Found key: "profile::admin::always_groups" value: [
Found key: "profile::admin::groups_no_ssh" value: []
Found key: "profile::admin::groups" value: [
Found key: "profile::admin::managehome" value: false
Found key: "profile::admin::managelingering" value: false
Found key: "profile::admin::purge_sudoers_d" value: false
Found key: "profile::apt::install_audit_installed" value: true
Found key: "profile::apt::manage_apt_source" value: true
Found key: "profile::apt::mirror" value: "mirrors.wikimedia.org"
Found key: "profile::apt::purge_preferences" value: true
Found key: "profile::apt::purge_sources" value: true
Found key: "profile::apt::use_private_repo" value: true
Found key: "profile::apt::use_proxy" value: true
Found key: "profile::auto_restarts::with_debdeploy" value: true
Found key: "profile::backup::days" value: [
Found key: "profile::backup::director_seed" value: "changeme"
Found key: "profile::backup::director" value: "backup1001.eqiad.wmnet"
Found key: "profile::backup::enable" value: true
Found key: "profile::backup::pool" value: "productionEqiad"
Found key: "profile::base::certificates::include_bundle_jks" value: false
Found key: "profile::base::certificates::puppet_ca_content" value: {}
Found key: "profile::base::certificates::trusted_certs" value: {
Found key: "profile::base::core_dump_pattern" value: "/var/tmp/core/core.%h.%e.%p.%t"
Found key: "profile::base::enable_contacts" value: true
Found key: "profile::base::firewall::block_abuse_nets" value: true
Found key: "profile::base::firewall::default_reject" value: false
Found key: "profile::base::firewall::defs_from_etcd" value: false
Found key: "profile::base::firewall::enable_logging" value: true
Found key: "profile::base::firewall::log::log_burst" value: 5
Found key: "profile::base::firewall::log::log_rate" value: "1/second"
Found key: "profile::base::firewall::log::separate_file" value: true
Found key: "profile::base::netbase::extra_services" value: {}
Found key: "profile::base::netbase::manage_etc_services" value: true
Found key: "profile::base::overlayfs" value: false
Found key: "profile::base::production::enable_ip6_mapped" value: true
Found key: "profile::base::production::enable" value: true
Found key: "profile::base::remote_syslog_send_logs" value: "standard"
Found key: "profile::base::remote_syslog_tls" value: {
Found key: "profile::base::remote_syslog" value: []
Found key: "profile::base::unprivileged_userns_clone" value: false
Found key: "profile::conftool::client::etcd_user" value: "root"
Found key: "profile::contacts::role_contacts" value: [
Found key: "profile::cumin::master::email_alerts" value: true
Found key: "profile::cumin::monitor_agentrun" value: true
Found key: "profile::cumin::monitoring_agentrun::crit" value: 20
Found key: "profile::cumin::monitoring_agentrun::warn" value: 1
Found key: "profile::debdeploy::client::ensure" value: "present"
Found key: "profile::debdeploy::client::exclude_filesystems" value: []
Found key: "profile::debdeploy::client::exclude_mounts" value: []
Found key: "profile::debdeploy::client::filter_services" value: {
Found key: "profile::debmonitor::client::ensure" value: "present"
Found key: "profile::debmonitor::client::ssl_ca_label" value: "debmonitor"
Found key: "profile::debmonitor::client::ssl_ca" value: "cfssl"
Found key: "profile::environment::custom_bashrc" value: nil
Found key: "profile::environment::custom_skel_bashrc" value: nil
Found key: "profile::environment::custom_skel_zshrc" value: nil
Found key: "profile::environment::editor" value: "vim"
Found key: "profile::environment::export_systemd_env" value: true
Found key: "profile::environment::ls_aliases" value: true
Found key: "profile::environment::profile_scripts" value: {
Found key: "profile::environment::variables" value: {}
Found key: "profile::ganeti::rapi::ro_password" value: "dummydummydummy"
Found key: "profile::ganeti::rapi::ro_user" value: "ro_user"
Found key: "profile::homer::diff_timer_interval" value: "*-*-* 20:35:00"
Found key: "profile::homer::private_git_peer" value: "cumin1001.eqiad.wmnet"
Found key: "profile::httpbb::basicauth_credentials" value: {
Found key: "profile::httpbb::hourly_tests" value: {
Found key: "profile::kubernetes::infrastructure_users" value: {
Found key: "profile::logoutd::group" value: "root"
Found key: "profile::logoutd::owner" value: "root"
Found key: "profile::logoutd::scripts" value: {}
Found key: "profile::mail::default_mail_relay::enabled" value: true
Found key: "profile::mail::default_mail_relay::template" value: "profile/mail/default_mail_relay/exim4.minimal.production.erb"
Found key: "profile::mariadb::section_ports" value: {
Found key: "profile::mariadb::wmfmariadbpy::role" value: "admin"
Found key: "profile::monitoring::cluster" value: "management"
Found key: "profile::monitoring::contact_group" value: "admins"
Found key: "profile::monitoring::do_paging" value: true
Found key: "profile::monitoring::hardware_monitoring" value: "present"
Found key: "profile::monitoring::hosts" value: {
Found key: "profile::monitoring::is_critical" value: false
Found key: "profile::monitoring::mgmt_contact_group" value: "admins"
Found key: "profile::monitoring::mgmt_parents" value: {
Found key: "profile::monitoring::monitoring_hosts" value: [
Found key: "profile::monitoring::monitor_systemd" value: true
Found key: "profile::monitoring::nagios_group" value: "management_codfw"
Found key: "profile::monitoring::notifications_enabled" value: true
Found key: "profile::monitoring::nrpe_check_disk_critical" value: false
Found key: "profile::monitoring::nrpe_check_disk_options" value: "-w 6% -c 3% -W 6% -K 3% -l -e -A -i \"/srv/sd[a-b][1-3]\" -i \"/srv/nvme[0-9]n[0-9]p[0-9]\" --exclude-type=fuse.fuse_dfs --exclude-type=tracefs"
Found key: "profile::monitoring::raid_check_interval" value: 10
Found key: "profile::monitoring::raid_check" value: true
Found key: "profile::monitoring::raid_retry_interval" value: 10
Found key: "profile::monitoring::raid_write_cache_policy" value: nil
Found key: "profile::monitoring::services" value: {
Found key: "profile::netbox::host::location" value: {
Found key: "profile::netbox::host::status" value: "active"
Found key: "profile::netbox::ro_token" value: "DUMMYREADONLYTOKEN"
Found key: "profile::netbox::rw_token" value: "DUMMYREADWRITETOKEN"
Found key: "profile::pki::client::auth_key" value: "aaaabbbbccccdddd"
Found key: "profile::pki::client::bundles_source" value: "puppet:///modules/profile/pki/intermediates"
Found key: "profile::pki::client::certs" value: {}
Found key: "profile::pki::client::enable_proxy" value: false
Found key: "profile::pki::client::ensure" value: "present"
Found key: "profile::pki::client::listen_addr" value: "127.0.0.1"
Found key: "profile::pki::client::listen_port" value: 8888
Found key: "profile::pki::client::mutual_tls_client_cert" value: "/var/lib/puppet/ssl/certs/cumin2002.codfw.wmnet.pem"
Found key: "profile::pki::client::mutual_tls_client_key" value: "/var/lib/puppet/ssl/private_keys/cumin2002.codfw.wmnet.pem"
Found key: "profile::pki::client::root_ca_cn" value: "Wikimedia_Internal_Root_CA"
Found key: "profile::pki::client::root_ca_source" value: nil
Found key: "profile::pki::client::signer_host" value: "pki.discovery.wmnet"
Found key: "profile::pki::client::signer_port" value: 443
Found key: "profile::pki::client::tls_remote_ca_source" value: nil
Found key: "profile::pki::client::tls_remote_ca" value: "/var/lib/puppet/ssl/certs/ca.pem"
Found key: "profile::prometheus::nic_saturation_exporter::ensure" value: "present"
Found key: "profile::puppet::agent::certificate_revocation" value: nil
Found key: "profile::puppet::agent::dns_alt_names" value: []
Found key: "profile::puppet::agent::enable_puppet7" value: false
Found key: "profile::puppet::agent::environment" value: "production"
Found key: "profile::puppet::agent::interval" value: 30
Found key: "profile::puppet::agent::serialization_format" value: "json"
Found key: "profile::puppet::client_bucket::ensure" value: "present"
Found key: "profile::puppet::client_bucket::file_age" value: 14
Found key: "profile::puppet::client_bucket::max_size" value: "100M"
Found key: "profile::resolving::attempts" value: 3
Found key: "profile::resolving::disable_dhcpupdates" value: false
Found key: "profile::resolving::disable_resolvconf" value: false
Found key: "profile::resolving::domain_search" value: [
Found key: "profile::resolving::nameservers" value: [
Found key: "profile::resolving::ndots" value: 1
Found key: "profile::resolving::timeout" value: 1
Found key: "profile::rsyslog::kafka_destination_clusters" value: {
Found key: "profile::rsyslog::kafka_queue_enabled_sites" value: [
Found key: "profile::rsyslog::kafka_shipper::enable" value: true
Found key: "profile::spicerack::firmware_store_dir" value: "/srv/firmware"
Found key: "profile::spicerack::ganeti_rapi_timeout" value: 30
Found key: "profile::spicerack::peeringdb_ro_token" value: "secrettoken"
Found key: "profile::spicerack::peeringdb_temp_dir" value: "/tmp/peeringdb-cache"
Found key: "profile::spicerack::reposync::ensure" value: "present"
Found key: "profile::spicerack::reposync::remotes" value: []
Found key: "profile::spicerack::reposync::repos" value: [
Found key: "profile::sre::check_user::proxy_server" value: "http://webproxy.codfw.wmnet:8080"
Found key: "profile::sre::check_user::service_file" value: "gsuite/mail_serviceaccount.json"
Found key: "profile::sre::check_user::super_admin" value: "admin@example.org"
Found key: "profile::sre::os_reports::host" value: "cumin2002.codfw.wmnet"
Found key: "profile::ssh::client::gss_api_authentication" value: true
Found key: "profile::ssh::client::gss_api_delegate_credentials" value: false
Found key: "profile::ssh::client::hash_known_hosts" value: true
Found key: "profile::ssh::client::manage_ssh_config" value: true
Found key: "profile::ssh::client::manage_ssh_keys" value: true
Found key: "profile::ssh::client::send_env" value: []
Found key: "profile::ssh::server::accept_env" value: []
Found key: "profile::ssh::server::authorized_keys_command" value: "/usr/sbin/ssh-key-ldap-lookup"
Found key: "profile::ssh::server::authorized_keys_file" value: [
Found key: "profile::ssh::server::challenge_response_auth" value: true
Found key: "profile::ssh::server::disable_agent_forwarding" value: true
Found key: "profile::ssh::server::disable_nist_kex" value: true
Found key: "profile::ssh::server::enable_hba" value: false
Found key: "profile::ssh::server::enable_kerberos" value: false
Found key: "profile::ssh::server::explicit_macs" value: true
Found key: "profile::ssh::server::gateway_ports" value: false
Found key: "profile::ssh::server::listen_addresses" value: []
Found key: "profile::ssh::server::listen_port" value: 22
Found key: "profile::ssh::server::max_sessions" value: nil
Found key: "profile::ssh::server::max_startups" value: nil
Found key: "profile::ssh::server::permit_root" value: true
Found key: "profile::systemd::timesyncd::ensure" value: "present"
Found key: "profile::systemd::timesyncd::ntp_servers" value: [
Found key: "prometheus_nodes" value: [
Found key: "puppet_ca_server" value: "puppetmaster1001.eqiad.wmnet"
Found key: "puppet_ca_source" value: "puppet:///modules/profile/puppet/ca.production.pem"
Found key: "puppet_config" value: {
Found key: "puppetdb_host" value: "puppetdb2002.codfw.wmnet"
Found key: "puppetmaster" value: "puppet"
Found key: "redis::shards" value: {
Found key: "rsync::server::wrap_with_stunnel" value: false
Found key: "service::catalog" value: {
Found key: "::site" value: "codfw"
Found key: "tcpircbot_host" value: "icinga.wikimedia.org"
Found key: "tcpircbot_port" value: 9200
Found key: "wikimail_smarthost" value: [
Found key: "wikimedia_clusters" value: {
Found key: "zookeeper_clusters" value: {
Found key: "zookeeper_hosts_main" value: [