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

Document that Plusignment +> on defined types ignores default value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docs
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Team:
      Froyo
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 4.10.5, 5.5.1, 5.5.8, 6.1.0
      OS Name/Version: CentOS 7.6.1810, Ubuntu 18.04, Sabayon 19.01

      When creating an instance of a defined type and then modifying it with plusignment at a later point, the first plusignment will overwrite the variable completely if it's using its default value at the time.

      Desired Behavior:

      Plusignment respects the current value - even if it is the default one

      Actual Behavior:

      Plusignment ignores any default value, replacing it entirely on the first run.

      Example manifests that show this problem have been attached, and the issue is demonstrated easily by attempting to apply them;

      $ puppet apply broken.pp
      Error: Evaluation Error: Error while evaluating a Resource Statement, Defined_type[broken]: parameter 'values' expects an Array value, got String (file: /tmp/tmp.CaxYtnutGf/broken.pp, line: 6) on node example.local
      $ puppet apply working.pp
      Notice: Scope(Defined_type[broken]): [This works]
      Notice: Compiled catalog for example.local in environment production in 0.02 seconds
      Notice: Applied catalog in 0.04 seconds
      $ puppet apply working2.pp
      Notice: Scope(Defined_type[broken]): [This works, as well]
      Notice: Compiled catalog for example.local in environment production in 0.01 seconds
      Notice: Applied catalog in 0.04 seconds
      

        Attachments

        1. broken.pp
          0.1 kB
        2. working.pp
          0.2 kB
        3. working2.pp
          0.2 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ananace Alexander Olofsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support