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

resource references to aliased resources does not always work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.8.0
    • Fix Version/s: PUP 5.0.0
    • Component/s: None
    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-04-05, PDE 2017-04-19
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      It was not possible to always use a resource alias when forming a resource relationship. If the relationship was formed with a relationship operator (->, ~> etc), the compilation would fail. If a meta parameter was used to form the relationship the problem in PUP-5659 would be triggered. Both problems are now fixed.
      Show
      It was not possible to always use a resource alias when forming a resource relationship. If the relationship was formed with a relationship operator (->, ~> etc), the compilation would fail. If a meta parameter was used to form the relationship the problem in PUP-5659 would be triggered. Both problems are now fixed.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      An alias on (at least) package and exec resources that worked fine to resolve a dependency at least in Puppet 3.4 doesn't work anymore in Puppet 4.8.0.
      I would expect that the manifest below would not create the Warning it gives.
      (I'm surprised by a warning that the dependency isn't found, but then getting a "dependency failed" on just that resource, though referenced by the title, not the alias, which in turn is OK)

      Almost minimal reproduction case:

      $ cat /tmp/t.pp; sudo puppet apply --detailed-exitcodes /tmp/t.pp; echo $?
      # $Id$
      package{'postfix':
        alias  => 'mta',
        ensure => latest,
      }
       
      exec{'/bin/false':
        alias => 'something',
      }
       
      notify{'Depended on mta':
        require => [Exec['something'], Package['mta']],
      }
      

      Warning: Could not find resource 'Exec[something]' in parameter 'require'
         (at /tmp/t.pp:12)
      Warning: Could not find resource 'Package[mta]' in parameter 'require'
         (at /tmp/t.pp:12)
      Notice: Compiled catalog for 90cdc197-bd0d-4ee2-8e22-cf4962548eb1 in environment standalone_puppet in 0.49 seconds
      Error: /bin/false returned 1 instead of one of [0]
      Error: /Stage[main]/Main/Exec[/bin/false]/returns: change from notrun to 0 failed: /bin/false returned 1 instead of one of [0]
      Notice: /Stage[main]/Main/Notify[Depended on mta]: Dependency Exec[/bin/false] has failures: true
      Warning: /Stage[main]/Main/Notify[Depended on mta]: Skipping because of failed dependencies
      Notice: Applied catalog in 0.62 seconds
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  incase Sven Mueller
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support