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

node namespaces override class namespaces if they happen to match

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • PUP 2.7.25, PUP 3.6.2
    • PUP 4.0.0
    • Compiler
    • None
    • 1
    • Language 2015-02-18

    Description

      if a node happens to match the name of a class, it will override its namespace with the node's namespace (which I didn't even know existed). I marked this as major b/c it potentially breaks any modules that rely on fully qualified namespace lookup (like apache)

      The issue is probably better articulated with the following simple example:

      class foo {
        $bar = 'one'
      }
       
      node /foo/ {
        $bar = 'two'
        include foo
        notice("${::foo::bar}")
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bodepd Dan Bode
              Kurt Wall Kurt Wall
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support