banjer
2012-Jun-27 18:20 UTC
[Puppet Users] REST API: facts_search on custom fact does not include puppet master in its list
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. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/LJJ4T_fHrzYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
banjer
2012-Jun-27 20:51 UTC
[Puppet Users] Re: REST API: facts_search on custom fact does not include puppet master in its list
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* > > 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. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/PH1Gsrh470UJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.