puppetdb tags are downcased

35 views
Skip to first unread message

David Schmitt

unread,
Aug 29, 2012, 8:26:39 AM8/29/12
to Puppet dev
Hi,

I just noticed that a problem I had in my manifests -- when talking to
puppetdb -- were tags that contained upper-case letters. The tag is stored
downcased, but the query is the original (non-matching) casing.

Example:

file { "/tmp/test": ensure => present tag => "pdsh::node::ABC" }
File <<| tag == 'pdsh::node::ABC' |>>


Normal storeconfigs collect the resource, storeconfig_backend puppetdb
doesn't.


Best Regards, David

Deepak Giridharagopal

unread,
Aug 29, 2012, 10:55:50 AM8/29/12
to puppe...@googlegroups.com
This is something we've recently fixed; it will be included in the
next release (due out in a few days):

https://github.com/puppetlabs/puppetdb/pull/260

Our terminus code was always down-casing tags on resources, making
them better conform to the semantics of the Puppet Language:

http://docs.puppetlabs.com/puppet/2.7/reference/lang_reserved.html#tags

With the above fix, PuppetDB will now validate that all resource tags
match the rules indicated in the language reference, and queries
against tags are now case-insensitive.

It's worth noting that while you can query tags in a case-insensitive
way, matching resources will have "tag" parameter values that are
downcased (as that's how puppet sends us the catalog in the first
place).

deepak

--
Deepak Giridharagopal / Puppet Labs
Reply all
Reply to author
Forward
0 new messages