Issue #11563 has been updated by Josh Cooper.
Status changed from Needs Decision to Investigating
<pre>
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:577:in `pack'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:577:in
`string_to_sid_ptr'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/provider/file/windows.rb:40:in
`name2uid'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:13:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `map!'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'
...
Could not evaluate: can't convert Fixnum into String
</pre>
This is #10586 which is not fixed in 2.7.9, but will be in 2.7.10. The issue is
that when sourcing a file from the puppet master, and an owner has not been
specified in the manifest, puppet will try to copy the uid from the Unix master
and apply it to the local file. Puppet is attempting to lookup the Windows user
whose SID matches the uid, and cannot convert the fixnum to a string, which
obviously fails. The workaround is to explicitly specify the owner and group in
your manifest, e.g.
<pre>
file { "c:/foo.txt":
source => "puppet:///modules/foo/foo.txt",
owner => 'Administrator',
group => 'Administrators',
}
</pre>
And since puppet could not apply the owner on the batch file (all part of the
DACL), the batch file is likely not executable, resulting in the permission
denied error:
<pre>
change from notrun to 0 failed: Permission denied -
C:/Users/ADMINI~1/AppData/Local/Temp/puppet20120104-3968-1idw0d-0
</pre>
Can you try installing the latest puppet version from
<https://github.com/puppetlabs/puppet/tree/2.7.x> to see if it fixes #10586 for
you, and to see if the permission denied error is also resolved?
----------------------------------------
Bug #11563: Can not create file in Windows 2008
https://projects.puppetlabs.com/issues/11563
Author: Feifei Jia
Status: Investigating
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords:
Branch:
I've tested Puppet client in Windows 2008 recently, on EC2 instance.
One problem I found is that, after I a first time successfully run, I
encountered "CreateProcess() failed" error:
<pre>
info: Caching catalog for ip-xxxxxxxx.ec2.internal
info: Applying configuration version '1324881415'
err: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/File
[c:\download\setup_env.bat]: Could not evaluate: CreateProcess() failed: The
system cannot find the file specified.
notice: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/E
xec[setup_env.bat]: Dependency File[c:\download\setup_env.bat] has failures:
tru e warning:
/Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/
Exec[setup_env.bat]: Skipping because of failed dependencies
</pre>
Related manifests:
<pre>
class foo {
define set_role ($role) {
file { 'c:\download\setup_env.bat':
ensure => file,
provider => windows,
content => template("foo/setup_env.bat.erb"),
}
exec { 'setup_env.bat':
cwd => 'c:\download',
path => 'c:\download;%PATH%',
provider => windows,
require => File['c:\download\setup_env.bat'],
}
}
}
</pre>
When I remove c:\download\setup_env.bat file, I can retrieve this file from
Puppet master, and execute well.
Puppet 2.7.9
Facter 1.6.4
Windows 2008 Datacenter SP2
Any hints?
--
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.