REST API: facts_search on custom fact does not include puppet master in its list

201 views
Skip to first unread message

banjer

unread,
Jun 27, 2012, 2:20:35 PM6/27/12
to puppet...@googlegroups.com
I'm running the following query to get a list of hosts in datacenter "abc":

root@puppet:~> curl -k -H "Accept: pson" https://puppet:8140/production/facts_search/search?facts.datacenter=abc
["host04","host05","web01","db01"]

datacenter is a custom fact distributed with pluginsync. The problem is, is that the puppet master host (hostname is puppet) is not returned in this list, even though its datacenter=abc.

The custom fact is available via the command line:

root@puppet:~> facter -p | grep datacenter
datacenter => btp

And on the agents, for example:

root@host04:~> facter -p | grep datacenter
datacenter => btp

I can also see datacenter is set correctly per Puppet Dashboard.  Also, running a facts_search on a non-cusom fact properly returns the puppet master along with other agents:

root@puppet:~> curl -k -H "Accept: pson" https://puppet:8140/production/facts_search/search?facts.operatingsystem=CentOS
["host04","host05","web01","db01","puppet","puppet.mydomain.com"]


FYI the puppet master is running on CentOS 6.2.

root@puppet:~> puppet --version
2.7.13
root@puppet:~> facter -v
1.6.7

Thought I'd ask here before filing a bug report.  Thanks for the assistance. 

banjer

unread,
Jun 27, 2012, 4:51:21 PM6/27/12
to puppet...@googlegroups.com
My original post should read "abc" and not "btp" in the "facter -p | grep datacenter" examples.  Edited inline below..


On Wednesday, June 27, 2012 2:20:35 PM UTC-4, banjer wrote:
I'm running the following query to get a list of hosts in datacenter "abc":

root@puppet:~> curl -k -H "Accept: pson" https://puppet:8140/production/facts_search/search?facts.datacenter=abc
["host04","host05","web01","db01"]

datacenter is a custom fact distributed with pluginsync. The problem is, is that the puppet master host (hostname is puppet) is not returned in this list, even though its datacenter=abc.

The custom fact is available via the command line:

root@puppet:~> facter -p | grep datacenter
datacenter => abc


And on the agents, for example:

root@host04:~> facter -p | grep datacenter
datacenter => abc
Reply all
Reply to author
Forward
0 new messages