Issue #15580 has been reported by Erik Dalén.
----------------------------------------
Bug #15580: Queries on environment fact always return all hosts
https://projects.puppetlabs.com/issues/15580
Author: Erik Dalén
Status: Unreviewed
Priority: Normal
Assignee:
Category: inventory service
Target version:
Affected Puppet version: 2.7.13
Keywords:
Branch:
I'm not sure if this is a bug in the inventory service or in the
puppetdb-terminus, but all queries on the environment facts (which both
puppetdb and the inventory service exposes as a fact) return a list of all
hosts.
When querying puppetdb directly it works as expected.
So these three queries return the same hosts:
https://puppet:8140/production/facts_search/search?facts.environment=production
https://puppet:8140/production/facts_search/search?facts.environment.ne=production
https://puppet:8140/production/facts_search/search?facts.environment=foobar
But these queries on the puppetdb server work (give different results):
curl -g -H 'Accept: application/json'
'http://localhost:8080/nodes?query=%5B%22and%22%2C%20%20%5B%22%3D%22%2C%20%5B%22node%22%2C%20%22active%22%5D%2C%20true%5D%2C%20%5B%22not%22%2C%20%5B%22%3D%22%2C%20%5B%22fact%22%2C%20%22environment%22%5D%2C%20%22production%22%5D%5D%5D'
curl -g -H 'Accept: application/json'
'http://localhost:8080/nodes?query=%5B%22and%22%2C%20%20%5B%22%3D%22%2C%20%5B%22node%22%2C%20%22active%22%5D%2C%20true%5D%2C%20%5B%22%3D%22%2C%20%5B%22fact%22%2C%20%22environment%22%5D%2C%20%22production%22%5D%5D'
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.