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

Resource overrides are order dependent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docs
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Team:
      Coremunity
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      It seems that Puppet 5 broke resource overrides being order independent.

      The docs state that:

      Resource defaults are evaluation-order independent — that is, a default affects resource declarations written both above and below it.

      Running the following produces different results:

      notify { 'foo': }
      Notify {
        name => 'foobar',
      }

      Notify {
        name => 'foobar',
      }
      notify { 'foo': }
      

      The first does

      Notice: Compiled catalog for jbeck.engineering.syd2.internal in environment production in 0.02 seconds
      Notice: foo
      Notice: /Stage[main]/Main/Notify[foo]/message: defined 'message' as 'foo'
      Notice: Applied catalog in 0.02 seconds
      

      The second does

      Notice: Compiled catalog for jbeck.engineering.syd2.internal in environment production in 0.02 seconds
      Notice: foobar
      Notice: /Stage[main]/Main/Notify[foo]/message: defined 'message' as 'foobar'
      Notice: Applied catalog in 0.02 seconds
      

      In Puppet 4.10.9 both versions produce the second result.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jbeck Jarryd Beck
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support