"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
Bill Waterson (Calvin & Hobbes)
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9936a2a4-0dd7-44ec-b286-919b999448a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 29/04/15 08:30, Dan White wrote:
> Have you tried plain YAML ?
> Your code looks OK, but I cannot be certain without tinkering. My initial thought is that the eyaml backend may be to blame.
So this is an issue I've run into on a couple of machines. As far as I
can tell, it's not eyaml, I found this reference to the issue with
relation to the automatic data bindings for hiera and hash merging:
https://tickets.puppetlabs.com/browse/HI-118
It's been a bit of an issue for a couple of machines for us. As far as
I've been able to tell, for where we do an actual heira lookup call it's
not affected, just for automatic bindings to parameters.
On 30/04/15 09:30, jcbollinger wrote:
>
<trim of summary of heira lookups>
>
> Priority lookup is Hiera's focus and default, and automated data binding
> uses that mode exclusively. If you want hash-merge lookup then you must
> call hiera_hash() explicitly in your manifest.
>
>
> John
>
John,
provisioning). Our hiera config is set for deeper merges.
The behavior
I expect is that I should be able to set common entries items for both
server's "mysql::server::override_options:" parameter hash at a lower
heira level and put the server specific override options at the host
specific level.
However, how automatic data bindings work it only takes
the highest priority hash.
The above is what I would expect the deeper merge to work like and I
think the original poster has this same issue. But what I have to do is
duplicate the hash from "mysql::server::override_options:" into both
servers, as in my above example, the only setting that gets applied due
to the priority lookup without hash merging is the server ID.
Since it's the Official Puppet Labs MySQL module, I'm not going to go
and change every hash parameter in the module to a hash lookup function,
because it would probably break something else.
So I deal with the work
around of unnecessary duplication of data in hiera and try to let
everyone I work with know of this limitation for hash lookups and
automatic data bindings when working with 3rd party modules.
We certainly can (and do) use an explicit hiera_hash() lookup in some of
our own internal modules, but this results in inconsistent behavior due
to the limitations of the automatic databindings.
The hiera issue is
the only reference to it I could find when I first started looking into
what was going on and why I wasn't getting the results I expected. It's
even mentioned in the hiera documentation:
https://docs.puppetlabs.com/hiera/1/lookup_types.html#deep-merging-in-hiera--120
My issue is that as more module support the passing of custom parameters
via a hash that people populate with Heira lookups (regardless of
storage backend), they're going to be running into this issue even more
and wondering why things don't work the way they expect they should.
Perhaps the additional information that automatic data bindings with
heira and puppet modules is priory only needs to be explicitly stated
that it won't merge any hashes. Because, the docs imply that merges
would happen with hashes (when they obviously don't).