Issue #12980 has been updated by Josh Cooper.

Keywords changed from windows, 32bit, 64bit to windows, 32bit, 64bit, 
redirection, syswow64

Fixing this is going to be harder than it should be. Puppet validates the exec 
resource's command using `Puppet::Util.which` based on the `resource[:path]`. 
Puppet then executes the command using the unqualified form (essentially 
throwing away the result of the `which` command). This is fine on POSIX, 
because when executing an exec:

<pre>
If the file argument contains a slash character, the file argument shall be 
used as the pathname for this file. Otherwise, the path prefix for this file is 
obtained by a search of the directories passed as the environment variable PATH
</pre>

In other words, `exec` just turns around and re-does what `which` did.

But on Windows, the call to `CreateProcess` looks in various directories before 
using the `PATH` environment variable, such as the current directory, current 
directory of the parent process, the `SYSWOW64` directory, etc. So I think the 
Windows exec provider should be modified to always execute using the fully 
qualified path as returned by `which`.
----------------------------------------
Bug #12980: Puppet on Windows execute search 32bit path first
https://projects.puppetlabs.com/issues/12980#change-64987

Author: Nan Liu
Status: Accepted
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.6
Keywords: windows, 32bit, 64bit, redirection, syswow64
Branch: 


Because ruby is a 32bit process, it searches 32bit path first, which 
unfortunately is typically the wrong binary on 64bit servers:

    "You cannot service a running 64-bit operating system with a 32-bit version 
of DISM.
    Please use the version of DISM that corresponds to your computer's 
architecture."


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to