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

Regression when comparing user groups

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 4.6.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      I found, that after updating from Puppet 4.5.3 to 4.6.0, my manifest started throwing an errors.

      Minimal manifest to reproduce:

      @user { 'foo':
              ensure => present,
              groups => ['bar'],
      }
       
      User <| title == 'foo' |> {
              groups +> ['baz'],
      }
      

      And log from running on version 4.6.0:

      root@foo ~ # puppet --version
      4.6.0
      root@foo ~ # puppet apply -t --noop test.pp 
      Info: Loading facts
      Notice: Compiled catalog for foo.local in environment production in 0.05 seconds
      Info: Applying configuration version '1471518062'
      Notice: /Stage[main]/Main/User[foo]/groups: current_value bar, should be bar,baz (noop)
      Notice: Class[Main]: Would have triggered 'refresh' from 1 events
      Notice: Stage[main]: Would have triggered 'refresh' from 1 events
      Notice: Applied catalog in 0.28 seconds
       
      root@foo ~ # puppet apply -t test.pp 
      Info: Loading facts
      Notice: Compiled catalog for foo.local in environment production in 0.05 seconds
      Info: Applying configuration version '1471518074'
      Error: /Stage[main]/Main/User[foo]: Could not evaluate: Group names must be provided as an array, not a comma-separated list.
      Notice: Applied catalog in 0.41 seconds
      

      The error is created, but change is applied.

      The same run on version 4.5.3

      root@foo ~ # puppet --version
      4.5.3
      root@foo ~ # puppet apply -t --noop test.pp 
      Info: Loading facts
      Notice: Compiled catalog for foo.local in environment production in 0.02 seconds
      Info: Applying configuration version '1471518239'
      Notice: /Stage[main]/Main/User[foo]/groups: current_value bar, should be bar,baz (noop)
      Notice: Class[Main]: Would have triggered 'refresh' from 1 events
      Notice: Stage[main]: Would have triggered 'refresh' from 1 events
      Notice: Applied catalog in 0.24 seconds
      root@foo ~ # puppet apply -t test.pp 
      Info: Loading facts
      Notice: Compiled catalog for foo.local in environment production in 0.02 seconds
      Info: Applying configuration version '1471518347'
      Notice: /Stage[main]/Main/User[foo]/groups: groups changed 'bar' to ['bar', 'baz']
      Notice: Applied catalog in 0.36 seconds
      

      As far as I see, it could be introduced in 277c90871c6870b689f40e535c0c6d2063176a95 or in 3d553b5aa7063bf59c771bb6a5fad833130548e2.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                invidian Mateusz Gozdek
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support