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

debug message for notify relationship is inaccurate - should be 'notifies' not 'subscribes'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.4.0
    • Component/s: None
    • Template:
    • Acceptance Criteria:
      Hide

      Having a resource A that notifies another resource B (notify => File['B']) results in a debug log message saying notifies to File['B'].

      Show
      Having a resource A that notifies another resource B ( notify => File ['B'] ) results in a debug log message saying notifies to File ['B'] .
    • Sub-team:
    • Team:
      Platform Core
    • Story Points:
      1
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      No Action

      Description

      When a resource subscribes to another resource, the debug output is as you might expect. Given:

      class foo {
        exec { 'notify test':
          command => '/usr/bin/true',
          refreshonly => true,
        }
      }
       
      class test {
        include foo
        exec { 'test':
          command => '/usr/bin/true',
          subscribe => Class['foo'],
        }
      }
       
      include test
      

      This debug line is logged:

      Debug: /Stage[main]/Test/Exec[test]/subscribe: subscribes to Class[Foo]
      

      All good so far. But if I have a notify, I get the same line. I.e., given:

          notify => Class['foo'],
      

      I get:

      Debug: /Stage[main]/Test/Exec[test]/notify: subscribes to Class[Foo]
      

      This line should read "notifies Class[Foo]", not "subscribes to Class[Foo]".

      This is important because this aspect of puppet is already hard enough to understand without inaccurate relationship reporting between resources. In puppet it is a very different thing to say something subscribes to another thing vs notifies it.

        Attachments

        1. type.rb
          100 kB
          Rebecca Robinson

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            moses Moses Mendoza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support