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

Resource defaults and resource overrides can lead to incorrect parameter conflicts

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • PUP 5.0.0
    • PUP 5.0.0
    • None
    • None
    • Agent
    • 1
    • Agent 2017-06-14
    • Customer Feedback
    • Not Needed
    • Problem in unreleased code.
    • Automate

    Description

      The error message is:

      Error: Parameter 'require' is already set on Package[pip] by #<Puppet::Resource::Type:0x005570c96bc260> at /home/branan/.puppetlabs/etc/code/environments/production/modules/foo/manifests/init.pp:4; cannot redefine at /home/branan/.puppetlabs/etc/code/environments/production/site.pp:1 on node rycon.delivery.puppetlabs.net
      

      This was discovered while Ops was trying to upgrade to a pre-release hoyt build.

      See the attached tarball for a minimal reproduction. This is an environment that can be untarred into a code dir and verified with puppet apply --debug --noop $CODEDIR/environments/repro/site.pp. The error only occurs when the resource override is in place. If the overridden parameters are inlined into the resource declaration, it works as expected.

      This was apparently introduced as part of PUP-7484, and is in general related to the PUP-25 work.

      According to a bisect, the breaking commit is 38413cd78c61fe34d2ee343ef773a07b4786f65a

      Attachments

        1. repro.tar.gz
          0.4 kB
          Branan Riley

        Issue Links

          Activity

            People

              Unassigned Unassigned
              branan Branan Riley
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support