Issue #19713 has been updated by Charlie Sharpsteen.

Category set to exec
Status changed from Unreviewed to Investigating
Assignee set to Charlie Sharpsteen


----------------------------------------
Bug #19713: error "private method 'scan' called for ...:Array" when array given 
as command param of exec type
https://projects.puppetlabs.com/issues/19713#change-86988

Author: jared jennings
Status: Investigating
Priority: Normal
Assignee: Charlie Sharpsteen
Category: exec
Target version: 
Affected Puppet version: 2.7.18
Keywords: 
Branch: 


It appears that after #4884, when the `exec` provider chosen is `posix`, an 
array passed to the command parameter of the exec type has a meaning, and that 
is that it gives an executable and a series of arguments. But if the command 
parameter makes it past the checkexe method of the provider, an error is 
thrown. To wit:

    $ puppet apply <<<'exec { "foo": command => ["echo", "bar"], provider => 
posix }'
    'echobar' is not qualified and no path was specified. Please qualify the 
command or specify a path.

That didn't make it past checkexe. No problems there. But:

    $ puppet apply --trace <<<'exec { "foo": command => ["/bin/echo", "bar"], 
provider => posix }'
    /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:443
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1636:in `instance_eval'
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1636:in `autorequire'
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1620:in `eachautorequire'
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1619:in `each'
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1619:in `eachautorequire'
    /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1631:in `autorequire'
    /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:315:in 
`relationship_graph'
    /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:314:in `each'
    /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:314:in 
`relationship_graph'
    /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:429:in 
`relationship_graph'
    /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
    /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
    /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:122:in 
`retrieve_and_apply_catalog'
    /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark'
    /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
    /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:159:in `benchmark'
    /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in 
`retrieve_and_apply_catalog'
    /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run'
    /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:229:in `main'
    /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:149:in `run_command'
    /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
    /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook'
    /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
    /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
    /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
    /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
    /usr/bin/puppet:4
    err: Got an uncaught exception of type NoMethodError: private method `scan' 
called for ["/bin/echo", "bar"]:Array
    notice: Finished catalog run in 0.04 seconds



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to