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

Corrective Change in Puppet 4.6.0 incorrectly errors when custom types are incompatible with it

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 4.6.0
    • Fix Version/s: PUP 4.6.1
    • Component/s: None
    • Labels:
    • Environment:

      Cisco Module CI Pipeline

    • Template:
    • Acceptance Criteria:
      Hide

      All Cisco Module test pass

      Show
      All Cisco Module test pass
    • Story Points:
      3
    • Sprint:
      Client 2016-08-24
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Corrective Change would incorrectly fail a catalog application when a type or property was incompatible with it. It now logs this information at info level.

      Description

      Puppet Agent 1.6.0 appears to break some of the cisco module functionality. The results of the last test run show 15 of the 157 tests cases errored out with a "Could not evaluate" failure.

      Email from Mike at Cisco

      Hi Folks,

      We actually discovered a problem with the new 1.6.0 rpm . We have a few manifests that fail during application. Here is an example.

      I tested this in the native bash shell

      root@n9k-108#puppet agent -t
      Info: Using configured environment 'production'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Info: Caching catalog for n9k-108.cisco.com
      Info: Applying configuration version '1471100275'
      Notice: /Stage[main]/Main/Node[default]/Cisco_tacacs_server[default]/ensure: created
      Notice: /Stage[main]/Main/Node[default]/Cisco_tacacs_server_host[1.1.1.1]/ensure: created
      Notice: /Stage[main]/Main/Node[default]/Cisco_aaa_group_tacacs[group1]/ensure: created
      Error: Unknown failure comparing values [["group1"]] and [] using insync? on type: Cisco_aaa_authorization_login_exec_svc[test_exec] property: groups
      Error: /Stage[main]/Main/Node[default]/Cisco_aaa_authorization_login_exec_svc[test_exec]: Could not evaluate: Validate method failed for class groups: undefined method `split' for ["group1"]:Array
      Info: Node[default]: Unscheduling all events on Node[default]
      Notice: Applied catalog in 4.76 seconds
      root@n9k-108#

      If I use version 1.5.3 I don’t see the issue.

      Here is a full traceback of the issue:

      root@n9k-108#puppet agent -t --trace
      Info: Using configured environment 'production'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Info: Caching catalog for n9k-108.cisco.com
      Info: Applying configuration version '1471100518'
      Notice: /Stage[main]/Main/Node[default]/Cisco_tacacs_server[default]/ensure: created
      Notice: /Stage[main]/Main/Node[default]/Cisco_tacacs_server_host[1.1.1.1]/ensure: created
      Notice: /Stage[main]/Main/Node[default]/Cisco_aaa_group_tacacs[group1]/ensure: created
      Error: Unknown failure comparing values [["group1"]] and [] using insync? on type: Cisco_aaa_authorization_login_exec_svc[test_exec] property: groups
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/vendor/rgen/lib/rgen/array_extensions.rb:25:in `method_missing'
      /opt/puppetlabs/puppet/cache/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb:77:in `block (3 levels) in <top (required)>'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parameter.rb:452:in `validate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `block in should='
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `should='
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:385:in `insync_values?'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event.rb:112:in `calculate_corrective_change'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:161:in `sync_if_needed'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:224:in `apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:240:in `eval_resource'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
      /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:137:in `as_logging_destination'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
      /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:98:in `with_client'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:65:in `run_in_fork'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:331:in `run_command'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
      /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
      Error: /Stage[main]/Main/Node[default]/Cisco_aaa_authorization_login_exec_svc[test_exec]: Could not evaluate: Validate method failed for class groups: undefined method `split' for ["group1"]:Array
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/vendor/rgen/lib/rgen/array_extensions.rb:25:in `method_missing'
      /opt/puppetlabs/puppet/cache/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb:77:in `block (3 levels) in <top (required)>'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parameter.rb:452:in `validate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `block in should='
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:562:in `should='
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:396:in `insync_values?'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event.rb:112:in `calculate_corrective_change'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:161:in `sync_if_needed'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:224:in `apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:240:in `eval_resource'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
      /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:137:in `as_logging_destination'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
      /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:in `override'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:98:in `with_client'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:65:in `run_in_fork'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:331:in `run_command'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
      /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
      Info: Node[default]: Unscheduling all events on Node[default]
      Notice: Applied catalog in 4.84 seconds
      root@n9k-108#

      I'm seeing the same error in the Cisco Module CI pipeline.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  stan Stan Duffy
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support