Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7216

hiera_hash doesn't use deeper merge

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: PUP 4.9.2
    • Fix Version/s: PUP 4.9.3
    • Component/s: Language
    • Labels:
    • Environment:

      Ubuntu 14.04 LTS on all Servers

    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-02-22, PDE 2017-03-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      A regression in calls to the hiera_xxx family of functions made them not honour default merge behavior defined in hiera.yaml.
    • QA Risk Assessment:
      Automate
    • QA Risk Assessment Reason:
      high risk; coverage in unit, but regression. acceptance me

      Description

      Apache modules which shall be used are defined with hiera files.

      Modules which shall be used by all webservers are defined in the file Ubuntu.yaml.
      In addition modules which are in the individual server configs (hostxyz.yaml) shall be used.

      Until upgrade to 4.9.x everything worked fine.
      Since the upgrade the infomation from Ubuntu.yaml gets ignored if modules in a node.yaml are defined.
      This causes that puppet removes the default modules and the webserver stops working.

      I could confirm, that deeper merge is basically working, but since the upgrade it seems it cannot handle this structured data.

      profiles:
        webserver:
          apache:
            httpd:
              modules:
                - mpm_prefork
                - php
                - ssl
      

      If no modules are defined in nodexyz.yaml I get in this basic demonstrator class (init.pp):

      sudo puppet agent -t -v
      Notice: Apache mod: auth_kerb
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: auth_kerb]/message: defined 'message' as 'Apache mod: auth_kerb'
      Notice: Apache mod: authnz_ldap
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: authnz_ldap]/message: defined 'message' as 'Apache mod: authnz_ldap'
      Notice: Apache mod: cgid
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: cgid]/message: defined 'message' as 'Apache mod: cgid'
      Notice: Apache mod: status
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: status]/message: defined 'message' as 'Apache mod: status'
      Notice: Applied catalog in 3.65 seconds
      

      As soon as I enable a module in nodexyz.yaml I get:

      Notice: Apache mod: mpm_prefork
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: mpm_prefork]/message: defined 'message' as 'Apache mod: mpm_prefork'
      Notice: Apache mod: php
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: php]/message: defined 'message' as 'Apache mod: php'
      Notice: Apache mod: ssl
      Notice: /Stage[main]/Testmodule/Notify[Apache mod: ssl]/message: defined 'message' as 'Apache mod: ssl'
      Notice: Applied catalog in 3.46 seconds
      

        Attachments

        1. hiera.yaml
          0.4 kB
        2. hostxzy.yaml
          0.2 kB
        3. init.pp
          0.4 kB
        4. Ubuntu.yaml
          0.9 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              christopher.siedler@hoerbiger.com Christopher Siedler
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support