Page MenuHomePhabricator

integration puppetmaster yield String, not Hash or nil at /etc/puppet/manifests/realm.pp:51
Closed, ResolvedPublic

Description

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Reading data from Integration/host/integration-puppetmaster01 failed:
 TypeError: Data retrieved from Integration/host/integration-puppetmaster01 is String, not Hash or nil
   at /etc/puppet/manifests/realm.pp:51
   on node integration-puppetmaster01.integration.eqiad.wmflabs
manifests/realm.pp
50 
51 $app_routes = hiera('discovery::app_routes')
52

Event Timeline

hashar triaged this task as High priority.
$ ./hiera_lookup -v --fqdn=`hostname -f` discovery::app_routes
...
DEBUG: 2017-07-26 09:09:10 +0000: Fetching https://wikitech.wikimedia.org/w/api.php?action=query&prop=revisions&format=json&rvprop=content&titles=Hiera:Integration/host/integration-puppetmaster01
/var/lib/git/operations/puppet/modules/wmflib/lib/hiera/mwcache.rb:40:in `rescue in read': Reading data from Integration/host/integration-puppetmaster01 failed: TypeError: Data retrieved from Integration/host/integration-puppetmaster01 is String, not Hash or nil (RuntimeError)
	from /var/lib/git/operations/puppet/modules/wmflib/lib/hiera/mwcache.rb:32:in `read'
	from /var/lib/git/operations/puppet/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb:28:in `block in lookup'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:76:in `block in datasources'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:74:in `map'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:74:in `datasources'
	from /var/lib/git/operations/puppet/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb:14:in `lookup'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:206:in `block in lookup'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:203:in `each'
	from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:203:in `lookup'
	from /usr/lib/ruby/vendor_ruby/hiera.rb:60:in `lookup'
	from ./hiera_lookup:122:in `<main>'

curl output

{
   "batchcomplete" : "",
   "query" : {
      "pages" : {
         "230713" : {
            "pageid" : 230713,
            "revisions" : [
               {
                  "contentmodel" : "yaml",
                  "*" : "---\n\"role::puppetmaster::standalone::autosign\": true",
                  "contentformat" : "application/yaml"
               }
            ],
            "title" : "Hiera:Integration/host/integration-puppetmaster01",
            "ns" : 666
         }
      }
   }
}
hashar added a subscriber: Joe.

Change 367870 had a related patch set uploaded (by Hashar; owner: Giuseppe Lavagetto):
[operations/puppet@production] hiera: fix mwcache library

https://gerrit.wikimedia.org/r/367870

Change 367870 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] hiera: fix mwcache library

https://gerrit.wikimedia.org/r/367870

hashar assigned this task to Joe.

Change 367870 merged by Giuseppe Lavagetto:
[operations/puppet@production] hiera: fix mwcache library

https://gerrit.wikimedia.org/r/367870