| We have recently been seeing an error appear whenever we apply certain manifests on a windows machine via Bolt. Originally we felt that this may be originating from a puppet agent change however we now feel that it is likely originating from bolt, more information on the investigations into Puppet Agent can be found in https://tickets.puppetlabs.com/browse/PA-3065. I have made multiple applications of a select manifest against the windows machines using bolt via litmus, bolt directly and through logging onto the machine and applying it manually. When applying the manifest via bolt in either way the result is an exit code of 1, while applying it manually gives an exit code of 0. I have attached screenshots of the results of each run onto this ticket and will paste the output below: When run locally
Administrator@wooden-debacle /cygdrive/c/tmp $ '../Program Files/Puppet Labs/Puppet/bin/puppet.bat' apply /tmp/manifest_20200129_56833_19lr8ku.pp --detailed-exitcodes Notice: Compiled catalog for wooden-debacle.delivery.puppetlabs.net in environment production in 0.11 seconds Error: /Stage[main]/Main/Concat[c:/concat_test/file]/Concat_file[c:/concat_test/file]: Failed to generate additional resources using 'eval_generate': Duplicate key 'one' found with values 'foo' and bar'. Use 'force' attribute to merge keys. Notice: Applied catalog in 0.02 secondsAdministrator@wooden-debacle /cygdrive/c/tmp $ echo $? 0 |
When run via litmus
1) force merge of file when run should not force applies manifest twice with stderr check On host `wooden-debacle.delivery.puppetlabs.net' Failure/Error: expect(apply_manifest(pp, catch_failures: true).stderr).to match("Duplicate key 'one' found with values 'foo' and bar'. Use 'force' attribute to merge keys.") RuntimeError: apply manifest failed ` puppet apply /tmp/manifest_20200129_56833_cptso6.pp --detailed-exitcodes` with exit code 1 (expected: [0, 2]) ====== Start output of failed Puppet apply ====== puppet.bat : Error: /Stage[main]/Main/Concat[c:/concat_test/file]/Concat_file[c:/concat_test/file]: Failed to generate additional resources using 'eval_generate': Duplicate key 'one' found with values 'foo' and bar'. Use 'force' attribute to merge keys. + CategoryInfo : NotSpecified: (Error: /...merge keys.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Notice: Compiled catalog for wooden-debacle.delivery.puppetlabs.net in environment production in 0.10 seconds Notice: Applied catalog in 0.02 seconds ====== End output of failed Puppet apply ====== # ./.bundle/gems/ruby/2.5.0/gems/puppet_litmus-0.14.0/lib/puppet_litmus/puppet_helpers.rb:278:in `report_puppet_apply_error' # ./.bundle/gems/ruby/2.5.0/gems/puppet_litmus-0.14.0/lib/puppet_litmus/puppet_helpers.rb:79:in `apply_manifest' # ./spec/acceptance/force_spec.rb:29:in `block (3 levels) in <top (required)>' |
When run via bolt
➜ puppetlabs-concat git:(master) ✗ bundle exec bolt command run "puppet apply /tmp/manifest_20200129_56833_19lr8ku.pp --detailed-exitcodes" --targets 'wooden-debacle.delivery.puppetlabs.net' --transport winrm --user Administrator --password Qu@lity! --no-ssl-verify Deprecation Warning: Starting with Bolt 2.0, inventory file v1 will no longer be supported. v1 inventory files can be automatically migrated to v2 using 'bolt project migrate'. Inventory files are modified in place and will not preserve formatting or comments.CLI arguments ["user", "password", "ssl-verify", "transport"] may be overridden by Inventory: /Users/david.swan/.puppetlabs/bolt/inventory.yaml Started on wooden-debacle.delivery.puppetlabs.net... Failed on wooden-debacle.delivery.puppetlabs.net: The command failed with exit code 1 STDOUT: Notice: Compiled catalog for wooden-debacle.delivery.puppetlabs.net in environment production in 0.11 seconds Notice: Applied catalog in 0.02 seconds STDERR: puppet.bat : Error: /Stage[main]/Main/Concat[c:/concat_test/file]/Concat_file[c:/concat_test/file]: Failed to generate additional resources using 'eval_generate': Duplicate key 'one' found with values 'foo' and bar'. Use 'force' attribute to merge keys. + CategoryInfo : NotSpecified: (Error: /...merge keys.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Failed on 1 target: wooden-debacle.delivery.puppetlabs.net Ran on 1 target in 8.44 sec |
This error originally presented on the concat module, and the results shown above are from the application of the first manifest in the concat modules `force_spec.rb` file. |