Issue #22878 has been updated by Melissa Stone. Status changed from Merged - Pending Release to Closed
Release in Puppet 3.3.2 ---------------------------------------- Bug #22878: Running processes on windows (through mcollective) cause private CloseHandle to be called instead of public method https://projects.puppetlabs.com/issues/22878#change-99825 * Author: Brandon Wulf * Status: Closed * Priority: High * Assignee: Brandon Wulf * Category: * Target version: 3.3.2 * Affected Puppet version: 3.3.0 * Keywords: puppet windows execute * Branch: ---------------------------------------- The [ensure] block doesn't qualify it's call to an object. The code seems clearly wrong (I'm not even a ruby programmer!) Here is the fix: <pre> lib/puppet/util/execution.rb @@ -148,8 +148,8 @@ def self.execute(command, options = NoOptionsSpecified) begin exit_status = Puppet::Util::Windows::Process.wait_process(process_info.process_handle) ensure - Process.CloseHandle(process_info.process_handle) - Process.CloseHandle(process_info.thread_handle) + Puppet::Util::Windows::Process.CloseHandle(process_info.process_handle) + Puppet::Util::Windows::Process.CloseHandle(process_info.thread_handle) end end </pre> Here is the error I get (through mcollective) when stopping a service: <pre> E, [2013-10-15T14:31:53.028353 #11036] ERROR -- : agent.rb:112:in `rescue in handlemsg' C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/execution.rb:150:in `execute' C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/provider/command.rb:23:in `execute' C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/provider.rb:233:in `block in has_command' C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/provider.rb:440:in `block in create_class_and_instance_method' C:/deploy/IT/Marionette-Collective/ruby/lib/ruby/gems/1.9.1/gems/puppet-3.3.0/lib/puppet/provider/service/windows.rb:82:in `stop' C:/deploy/IT/Marionette-Collective/plugins/mcollective/util/service/puppetservice.rb:9:in `stop' C:/deploy/IT/Marionette-Collective/plugins/mcollective/agent/service.rb:59:in `do_service_action' C:/deploy/IT/Marionette-Collective/plugins/mcollective/agent/service.rb:6:in `block in <class:Service>' C:/deploy/IT/Marionette-Collective/lib/mcollective/rpc/agent.rb:88:in `handlemsg' C:/deploy/IT/Marionette-Collective/lib/mcollective/agents.rb:126:in `block (2 levels) in dispatch' C:/deploy/IT/Marionette-Collective/ruby/lib/ruby/1.9.1/timeout.rb:69:in `timeout' C:/deploy/IT/Marionette-Collective/lib/mcollective/agents.rb:125:in `block in dispatch' C:/deploy/IT/Marionette-Collective/ruby/lib/ruby/1.9.1/win32ole.rb:13:in `call' C:/deploy/IT/Marionette-Collective/ruby/lib/ruby/1.9.1/win32ole.rb:13:in `block in initialize' </pre> -- 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. For more options, visit https://groups.google.com/groups/opt_out.
