On Thursday, August 8, 2013 2:14:33 PM UTC+1, Ken Barber wrote:
>
> > I think that's just me being too sensorship heavy and abusing copy and 
> > paste, I would have copied some fields from the same example. Trust me 
> that 
> > the resources dictionary was empty though ;-) 
>
> So just to clarify, the resources hash 
> '8ba4379c364b9dba9d18836ef52ce5f4f82d0468' was different or the same 
> between the two examples? 
>

Actually they are the same, my copy and paste skills remain rock solid for 
another day.

I found some more broken resources belonging to some dev servers with a 
handy jgrep:

curl -H 'Accept: application/json' -X GET 
'https://puppet:8081/v2/resources' --cacert 
/var/lib/puppet/ssl/ca/ca_crt.pem --cert 
/var/lib/puppet/ssl/certs/puppet.pem  --key 
/var/lib/puppet/ssl/private_keys/puppet.pem --data-urlencode 'query=["=", 
"type", "Nagios::Config::Host"]' | jgrep "parameters.host_alias=null"

This is the hostname redacted JSON before:

***************************
[
  {
    "type": "Nagios::Config::Host",
    "tags": [
      "nagios::host",
      "default",
      "node",
      "config",
      "nagios::config::host",
      "hostname",
      "en1",
      "host",
      "nagios::host::host",
      "undef",
      "class",
      "nagios"
    ],
    "parameters": {
    },
    "certname": "hostname",
    "title": "hostname",
    "resource": "3368824b20c1eb7052952f574bb5547ca0c95a50",
    "sourcefile": 
"/etc/puppet/environments/production/modules/nagios/manifests/host/host.pp",
    "sourceline": 27,
    "exported": true
  }
]
***************************

And after a Puppet run to refresh the catalog:


***************************
[
  {
    "type": "Nagios::Config::Host",
    "sourceline": 27,
    "certname": "hostname",
    "resource": "3368824b20c1eb7052952f574bb5547ca0c95a50",
    "exported": true,
    "title": "hostname",
    "tags": [
      "nagios::host",
      "node",
      "config",
      "nagios::config::host",
      "hostname",
      "en1",
      "host",
      "nagios::host::host",
      "undef",
      "base",
      "class",
      "nagios"
    ],
    "parameters": {
      "host_alias": "hostname",
      "tag": "en1",
      "address": "hostname"
    },
    "sourcefile": 
"/etc/puppet/environments/production/modules/nagios/manifests/host/host.pp"
  }
]
***************************

So there's 12 resources with this problem remaining now.

-Luke

> Now if I was thinking smart I would have taken a Postgres backup before I 
> > re-freshed all the catalogs, but I didn't, not sure if that would have 
> > helped much. I agree with subsequent posts as well - probably not a 
> > migration problem. 
>
> It might have helped. Are any other nodes and resources still 
> exhibiting this strange behaviour? Maybe checking for any exported 
> resources with no params might be worthwhile. 
>
> ken. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to