Ask Your Question
0

hiera_hash deeper merge not working after upgrade to PE3.7.1

asked 2015-01-21 04:19:25 -0600

kariboe gravatar image

updated 2015-01-22 02:46:46 -0600

Upgraded to Puppet 3.7.3 (Puppet Enterprise 3.7.1), had a working environment in PE3.2.3. issue: deeper merge of hiera_hash no longer works.

/etc/puppetlabs/puppet/hiera.yaml:

---
:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata/
:merge_behavior: deeper
:hierarchy:
  - "nodes/%{fqdn}"
  - "environment/%{environment}"
  - common

common.yaml:

web:
  php:
    modules:
      - mcrypt

node.yaml:

web:
  php:
    modules:
      - cli

inside my puppet module:

  # Hiera Data Lookup
  $web_values = hiera_hash('web', false)
  notify {"web_values: ${web_values}":}

output puppet agent:

  {"php"=> {"modules"=>["cli"]}}

output hiera commandline lookup:

  {"php"=> {"modules"=>["mcrypt", "cli"]}}

So a commandline lookup with option --hash gives me the expected result. Inside a Puppet run it fails. Any help is appreciated. I have the deep_merge gem installed. Hiera version: 1.3.4

edit retag flag offensive close merge delete

Comments

The JRuby processes run by the Puppet Server use a separate set of gems. Have you also installed deep_merge via `/opt/puppet/bin/puppetserver gem install`?

csharpsteen gravatar imagecsharpsteen ( 2015-01-21 14:31:14 -0600 )edit

That did the trick. Deeper merge is working again. Thanks! How can I flag your comment as answer?

kariboe gravatar imagekariboe ( 2015-01-22 02:45:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-22 09:25:51 -0600

csharpsteen gravatar image

The deep_merge gem needs to be installed via:

/opt/puppet/bin/puppetserver gem install

The JVM-based Puppet Server (included in PE since 3.7) uses JRuby to run the Puppet Master process. Because of the JRuby runtime, the Puppet Server has to maintain a separate set of gems than what is used by CRuby tools such as the Puppet Agent and the Hiera command line. Note that JRuby will not be able to install gems using compiled C code; such as non-JDBC database drivers.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-21 04:19:25 -0600

Seen: 1,058 times

Last updated: Jan 22 '15