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

Puppet master does not fail catalog on unexisting resource in resource parameter

    Details

    • Template:
    • Epic Link:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-02-08, PDE 2017-02-22, PDE 2017-03-08, PDE 2017-03-22, PDE 2017-04-05, PDE 2017-04-19
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Relationships formed via meta parameters (require, etc.) are now validated when everything in a catalog has been evaluated, and if there is a reference to a resource that is not in the catalog an error is raised. In earlier versions an error was raised when the catalog was applied on an agent. Now an error is raised when validating the compilation result. In earlier versions this was only done when a relationship was formed using the arrow operators. The behaviour could be controlled with the {{strict}} setting but it would then issue warning or error for relationships formed with aliases (see PUP-6984). Both problems are now fixed.
      Show
      Relationships formed via meta parameters (require, etc.) are now validated when everything in a catalog has been evaluated, and if there is a reference to a resource that is not in the catalog an error is raised. In earlier versions an error was raised when the catalog was applied on an agent. Now an error is raised when validating the compilation result. In earlier versions this was only done when a relationship was formed using the arrow operators. The behaviour could be controlled with the {{strict}} setting but it would then issue warning or error for relationships formed with aliases (see PUP-6984 ). Both problems are now fixed.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      The behavior of Resources in require => parameter and in relations is different.

      When compiling the catalog of the two following nodes, the first one fails on the client side, and the second one on the server side. This is very annoying because you think that the catalog can be applied successfully (e.g if you test using puppet master compile).

      node missing1 {
        notify {'a':
          require => Notify['b'],
        }
      }
       
      node missing2 {
        notify {'a': }
        Notify['b'] -> Notify['a']
      }
      

      When validation is added it must:

      • Allow the value to be a resource reference tree
      • Update the language specification and documentation and clearly state that trailing punctuation makes two type references not considered equal. (i.e. File[/tmp/foo/], and File[/tmp//foo]) as this knowledge is implementation specific and may even depend on the provider and underlying target system state). i.e. this will not be supported:

        file { '/tmp/': } ... notify { 'a': require => File['/tmp'] } (note the trailing forward slash).
        

      • Support Aliases (the relationship operators do not do that correctly).

        notify { 'a': alias => 'b'} ... notify { 'c': require => Notify['b'] }
        

      Note that this ticket was originally added to Puppet 4.4.0, but was reverted before release in PUP-5850 as that implementation caused too much downstream breakage.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  roidelapluie Julien Pivotto
                  QA Contact:
                  Eric Thompson
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: