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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 5.4.0
    • None
    • 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'] .
    • Platform Core
    • 1
    • Platform Core KANBAN
    • Needs Assessment
    • Not Needed
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support