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

hiera_include does not have access to variables from node scope when future parser is enabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.0
    • Fix Version/s: PUP 3.8.2, PUP 4.2.1
    • Component/s: None
    • Labels:
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-07-08
    • CS Priority:
      Critical
    • CS Frequency:
      2 - 5-25% of Customers
    • CS Severity:
      5 - Critical
    • CS Business Value:
      5 - $$$$$$
    • CS Impact:
      Hide
      We don't fully understand what broke, but this seems very important. Hiera_include with future parser has been broke for two releases and we should probably fix that before we tell everyone to start using it.

      Some of our largest customers use hiera_include, the frequency is low because most people don't use node scope variables. The severity is high because if people upgrade this could ravage their nodes due to no longer getting their node scope variables.
      Show
      We don't fully understand what broke, but this seems very important. Hiera_include with future parser has been broke for two releases and we should probably fix that before we tell everyone to start using it. Some of our largest customers use hiera_include, the frequency is low because most people don't use node scope variables. The severity is high because if people upgrade this could ravage their nodes due to no longer getting their node scope variables.
    • Release Notes:
      Bug Fix

      Description

      The 4.x hiera include function does not propagate the correct scope to the include function and this screws up in which context/scope things are being looked up.

      WORKAROUND


      Instead of hiera_include use include hiera_array('classes') as the problem is with the 'include' functionality inside of hiera_include.

      REPRODUCTION


      [root@master381-centos-2 ~]# cat /etc/puppetlabs/puppet/environments/production/modules/test/manifests/init.pp
      class test {
       
        notify { "my role is ${role}": }
       
      }
      [root@master381-centos-2 ~]# cat /etc/puppetlabs/puppet/environments/production/modules/test_wrapper/manifests/init.pp
      class test_wrapper {
       
        notify { "in test_wrapper ${role}" : }
        include test
       
      }
      [root@master381-centos-2 ~]# cat /etc/puppetlabs/puppet/environments/production/manifests/site.pp
       
      node default {
        #$role = 'my_test_role'
        hiera_include( 'classes' )
        #include hiera_array('classes')
        notify { "${role}" : }
       
      }
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  nick.walker Nick Walker
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: