Ask Your Question

Revision history [back]

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments
| ---<product>
| | environment.conf
| |
| +---configuration
| |-------namelessserver.yaml
| |-------common.yaml
| |-------baseserver.yaml
| |-------wicked_cool_server.yaml
| |-------versions.yaml
| |
| ---modules
| +---apps
| | ---iis
| | ---manifests
| | -------init.pp
| |


Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments
| ---<product>
| | environment.conf
| |
| +---configuration
| |-------namelessserver.yaml
| |-------common.yaml
| |-------baseserver.yaml
| |-------wicked_cool_server.yaml
| |-------versions.yaml
| |
| ---modules
| +---apps
| | ---iis
| | ---manifests
| | -------init.pp
| |


Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method downcase' for #<array:0x000000000374cdd8> C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in block (2 levels) in prefetch'
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in each'
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in find'
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in block in prefetch'
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in each'
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in prefetch'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in prefetch'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in prefetch_if_necessary'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in block in evaluate'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in traverse'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in evaluate'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in block (2 levels) in apply'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in block in thinmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in thinmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in block in apply'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in with_destination'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in as_logging_destination'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in apply'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in block (2 levels) in apply_catalog'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in block in thinmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in thinmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in block in apply_catalog'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in block in benchmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in benchmark'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in apply_catalog'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in run_internal'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in block in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in apply_catalog'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in block (2 levels) in main'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in block in main'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in main'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in run_command'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in block in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in exit_on_fail'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in execute'
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in <main>'

click to hide/show revision 3
None

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments 
| ---<product>
| \---<product> | | environment.conf
| |
| | | +---configuration
| |-------namelessserver.yaml
| |-------common.yaml
| |-------baseserver.yaml
| |-------wicked_cool_server.yaml
| |-------versions.yaml
| |
| ---modules
| | | \---modules | +---apps
| | ---iis
| | ---manifests
| | \---iis | | \---manifests | | -------init.pp
| |

| |

Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method downcase' `downcase'`   for #<array:0x000000000374cdd8>
#<Array:0x000000000374cdd8>
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in block `block (2 levels) in prefetch' 
prefetch'` C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in each'
`each'` C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in find'
`find'` C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in block in prefetch'
`block in prefetch'` C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in each'
`each'` C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in prefetch'
`prefetch'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in prefetch'
`prefetch'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in prefetch_if_necessary'
`prefetch_if_necessary'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in block in evaluate'
`block in evaluate'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in traverse'
`traverse'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in evaluate'
`evaluate'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in block `block (2 levels) in apply'
apply'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in block in thinmark'
`block in thinmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
`realtime'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in thinmark'
`thinmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in block in apply'
`block in apply'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in with_destination'
`with_destination'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in as_logging_destination'
`as_logging_destination'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in apply'
`apply'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in block `block (2 levels) in apply_catalog'
apply_catalog'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in block in thinmark'
`block in thinmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
`realtime'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in thinmark'
`thinmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in block in apply_catalog'
`block in apply_catalog'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in block in benchmark'
`block in benchmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
`realtime'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in benchmark'
`benchmark'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in apply_catalog'
`apply_catalog'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in run_internal'
`run_internal'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in block in run'
`block in run'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
`override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
`override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in run'
`run'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in apply_catalog'
`apply_catalog'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in block `block (2 levels) in main'main'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in `exit_on_fail'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'` C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'` C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'`
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in block in main'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in override'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in main'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in run_command'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in block in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in exit_on_fail'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in run'
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in execute'
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in <main>'

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments  
|   \---<product>  
|       |   environment.conf  
|       |     
|       +---configuration  
|       |-------namelessserver.yaml  
|       |-------common.yaml  
|       |-------baseserver.yaml  
|       |-------wicked_cool_server.yaml  
|       |-------versions.yaml  
|       |         
|       \---modules  
|           +---apps  
|           |   \---iis  
|           |       \---manifests  
|           |               -------init.pp  
|           |

Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1539_CST WindowsFeature:

It seems that inside of my iis/manifests/init.pp, I was calling a windows feature "IIS" to be installed. In previous versions, (I'm assuming this as I did not create this module) it seems that having the "name" parameter with an array of items would work. However, in this version it crashes and gives this ambiguous error message. Yes, there was an array (two in fact, for different windows features), but I'm unsure if this is an error on my part (lack of knowledge), or a defect. Should the windowsfeature give me a file that it was complaining about?

I was able to verify this by commenting out my resources (windowsfeature) and re-run puppet which completed unsuccessfully (I had powershell scripts that need IIS installed first). Then added one of my resources back and got the same error. I'm not sure this worked completely as my test vm is still running puppet as I type. I feel that it would have broken already if it was bad code.

So in short: Is this a defect? or Is this just a lack of keeping up with the current release and changes that come with puppetforge items? I'm leaning towards a lack of maintaining an updated puppetforge item instead of defect. Thoughts?

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase'`   for #<Array:0x000000000374cdd8>
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block (2 levels) in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `find'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `prefetch_if_necessary'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in `block in evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in `traverse'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in `exit_on_fail'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'`  
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'`

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments  
|   \---<product>  
|       |   environment.conf  
|       |     
|       +---configuration  
|       |-------namelessserver.yaml  
|       |-------common.yaml  
|       |-------baseserver.yaml  
|       |-------wicked_cool_server.yaml  
|       |-------versions.yaml  
|       |         
|       \---modules  
|           +---apps  
|           |   \---iis  
|           |       \---manifests  
|           |               -------init.pp  
|           |

Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1539_CST WindowsFeature:

It seems that inside of my iis/manifests/init.pp, I was calling a windows feature "IIS" to be installed. In previous versions, (I'm assuming this as I did not create this module) it seems that having the "name" parameter with an array of items would work. However, in this version it crashes and gives this ambiguous error message. Yes, there was an array (two in fact, for different windows features), but I'm unsure if this is an error on my part (lack of knowledge), or a defect. Should the windowsfeature give me a file that it was complaining about?

I was able to verify this by commenting out my resources (windowsfeature) and re-run puppet which completed unsuccessfully (I had powershell scripts that need IIS installed first). Then added one of my resources back and got the same error. I'm not sure this worked completely as my test vm is still running puppet as I type. I feel that it would have broken already if it was bad code.

edit within an edit 05/02/2018 1622_CST Here's a code example of what was happening in: iis/manifests/init.pp

windowsfeature { 'IIS': feature_name => [
'Web-Server',
'Web-WebServer',
'Web-Common-Http',
'Web-Static-Content',
'Web-Default-Doc',
'Web-Dir-Browsing',
'Web-Http-Errors',
'Web-Http-Redirect',
'Web-Asp-Net',
'Web-Net-Ext',
'Web-ISAPI-Ext',
'Web-ISAPI-Filter',
'Web-Health',
'Web-Http-Logging',
'Web-Log-Libraries',
'Web-Request-Monitor',
'Web-Http-Tracing',
'Web-Security',
'Web-Basic-Auth',
'Web-Windows-Auth',
'Web-Digest-Auth',
'Web-Client-Auth',
'Web-Cert-Auth',
'Web-Url-Auth',
'Web-Filtering',
'Web-IP-Security',
'Web-Performance',
'Web-Stat-Compression',
'Web-Dyn-Compression',
'Web-Mgmt-Tools',
'Web-Mgmt-Console',
'Web-Scripting-Tools',
'Web-Mgmt-Service'
]
}

So in short: Is this a defect? or Is this just a lack of keeping up with the current release and changes that come with puppetforge items? I'm leaning towards a lack of maintaining an updated puppetforge item instead of defect. Thoughts?

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase'`   for #<Array:0x000000000374cdd8>
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block (2 levels) in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `find'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `prefetch_if_necessary'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in `block in evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in `traverse'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in `exit_on_fail'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'`  
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'`

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments  
|   \---<product>  
|       |   environment.conf  
|       |     
|       +---configuration  
|       |-------namelessserver.yaml  
|       |-------common.yaml  
|       |-------baseserver.yaml  
|       |-------wicked_cool_server.yaml  
|       |-------versions.yaml  
|       |         
|       \---modules  
|           +---apps  
|           |   \---iis  
|           |       \---manifests  
|           |               -------init.pp  
|           |

Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1539_CST WindowsFeature:

It seems that inside of my iis/manifests/init.pp, I was calling a windows feature "IIS" to be installed. In previous versions, (I'm assuming this as I did not create this module) it seems that having the "name" parameter with an array of items would work. However, in this version it crashes and gives this ambiguous error message. Yes, there was an array (two in fact, for different windows features), but I'm unsure if this is an error on my part (lack of knowledge), or a defect. Should the windowsfeature give me a file that it was complaining about?

I was able to verify this by commenting out my resources (windowsfeature) and re-run puppet which completed unsuccessfully (I had powershell scripts that need IIS installed first). Then added one of my resources back and got the same error. I'm not sure this worked completely as my test vm is still running puppet as I type. I feel that it would have broken already if it was bad code.

edit within an edit 05/02/2018 1622_CST Here's a code example of what was happening in: iis/manifests/init.pp

windowsfeature { 'IIS': 'IIS':
feature_name => [
'Web-Server',
'Web-WebServer',
'Web-Common-Http',
'Web-Static-Content',
'Web-Default-Doc',
'Web-Dir-Browsing',
'Web-Http-Errors',
'Web-Http-Redirect',
'Web-Asp-Net',
'Web-Net-Ext',
'Web-ISAPI-Ext',
'Web-ISAPI-Filter',
'Web-Health',
'Web-Http-Logging',
'Web-Log-Libraries',
'Web-Request-Monitor',
'Web-Http-Tracing',
'Web-Security',
'Web-Basic-Auth',
'Web-Windows-Auth',
'Web-Digest-Auth',
'Web-Client-Auth',
'Web-Cert-Auth',
'Web-Url-Auth',
'Web-Filtering',
'Web-IP-Security',
'Web-Performance',
'Web-Stat-Compression',
'Web-Dyn-Compression',
'Web-Mgmt-Tools',
'Web-Mgmt-Console',
'Web-Scripting-Tools',
'Web-Mgmt-Service'
]
}

So in short: Is this a defect? or Is this just a lack of keeping up with the current release and changes that come with puppetforge items? I'm leaning towards a lack of maintaining an updated puppetforge item instead of defect. Thoughts?

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase'`   for #<Array:0x000000000374cdd8>
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block (2 levels) in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `find'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `prefetch_if_necessary'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in `block in evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in `traverse'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in `exit_on_fail'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'`  
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'`

Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

NOTE: I am very new to Puppet and have only been accomplishing very simple tasks but not actually managing the puppet system. I since upgraded a test server environment to Microsoft's Windows Server Desktop 2016, and I have been simply adjusting files to get the Puppet code to apply (fixing facts and custom facts generated by in-house code). I have searched high and low for a solution, and I can only guess at the issue here:

  • It is a ruby issue?? Maybe..

I know.. very, very weak assessment. But, I am confused as to what is happening. Here is my file tree which I know is wrong in some respects, but I'm just trying to get Puppet to work at this point.


+---environments  
|   \---<product>  
|       |   environment.conf  
|       |     
|       +---configuration  
|       |-------namelessserver.yaml  
|       |-------common.yaml  
|       |-------baseserver.yaml  
|       |-------wicked_cool_server.yaml  
|       |-------versions.yaml  
|       |         
|       \---modules  
|           +---apps  
|           |   \---iis  
|           |       \---manifests  
|           |               -------init.pp  
|           |

Externals contains puppet forge items which is listed under the modules directory:

  • Powershell
  • windowsfeature
  • ie_esc
  • iis

Here's my OS and Puppet version. I know.. Windows (insert pitchfork mafia here)

image description

So, what is happening?

I run puppet:

puppet apply --test --summarize --debug --logdest %PUPPET_DIR%\puppet.log C:\ProgramData\PuppetLabs\puppet\etc\manifests\ >> %PUPPET_DIR%\puppetstatus.txt

And, the only error I get is:

2018-05-02 12:01:17 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase' for #<array:0x0000000005713838>

EDIT 05/02/2018 1539_CST WindowsFeature:

It seems that inside of my iis/manifests/init.pp, I was calling a windows feature "IIS" to be installed. In previous versions, (I'm assuming this as I did not create this module) it seems that having the "name" parameter with an array of items would work. However, in this version it crashes and gives this ambiguous error message. Yes, there was an array (two in fact, for different windows features), but I'm unsure if this is an error on my part (lack of knowledge), or a defect. Should the windowsfeature give me a file that it was complaining about?

I was able to verify this by commenting out my resources (windowsfeature) and re-run puppet which completed unsuccessfully (I had powershell scripts that need IIS installed first). Then added one of my resources back and got the same error. I'm not sure this worked completely as my test vm is still running puppet as I type. I feel that it would have broken already if it was bad code.

edit within an edit 05/02/2018 1622_CST Here's a code example of what was happening in: iis/manifests/init.pp

windowsfeature { 'IIS':
feature_name name => [
'Web-Server',
'Web-WebServer',
'Web-Common-Http',
'Web-Static-Content',
'Web-Default-Doc',
'Web-Dir-Browsing',
'Web-Http-Errors',
'Web-Http-Redirect',
'Web-Asp-Net',
'Web-Net-Ext',
'Web-ISAPI-Ext',
'Web-ISAPI-Filter',
'Web-Health',
'Web-Http-Logging',
'Web-Log-Libraries',
'Web-Request-Monitor',
'Web-Http-Tracing',
'Web-Security',
'Web-Basic-Auth',
'Web-Windows-Auth',
'Web-Digest-Auth',
'Web-Client-Auth',
'Web-Cert-Auth',
'Web-Url-Auth',
'Web-Filtering',
'Web-IP-Security',
'Web-Performance',
'Web-Stat-Compression',
'Web-Dyn-Compression',
'Web-Mgmt-Tools',
'Web-Mgmt-Console',
'Web-Scripting-Tools',
'Web-Mgmt-Service'
]
}

So in short: Is this a defect? or Is this just a lack of keeping up with the current release and changes that come with puppetforge items? I'm leaning towards a lack of maintaining an updated puppetforge item instead of defect. Thoughts?

EDIT 05/02/2018 1437_CST In response to what csharpsteen asked:

2018-05-02 14:34:13 -0500 Puppet (err): Failed to apply catalog: undefined method `downcase'`   for #<Array:0x000000000374cdd8>
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block (2 levels) in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `find'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:49:in `block in prefetch'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `each'`  
C:/ProgramData/PuppetLabs/puppet/etc/environments/product/modules/externals/puppet-windowsfeature-3.2.0/lib/puppet/provider/windowsfeature/default.rb:48:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:357:in `prefetch'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `prefetch_if_necessary'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:109:in `block in evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:119:in `traverse'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:513:in `block in thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:512:in `thinmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet.rb:260:in `override'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util.rb:661:in `exit_on_fail'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'`  
C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'`  
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'`