Issue #10586 has been updated by Josh Cooper. Status changed from Investigating to Accepted Target version set to 2.7.x
Since the manifest does not define a group, puppet is attempting to apply the numeric gid from the file metadata, and failing to convert the fixnum to a string. We should handle this more gracefully. The posix file provider returns nil in cases like this, e.g. the method name2uid returns nil if the uid doesn't exist on the endpoint, so the windows provider should do something similar. Here's the stack trace leading up to the error (The line numbers don't match exactly due to debugging): <pre> ["c:/ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:544:in `name2gid'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:544:in `name2gid'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/group.rb:20:in `insync?'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/group.rb:19:in `map!'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/group.rb:19:in `insync?'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'", "c:/ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in `perform_changes'", </pre> This issue can be worked around by always specifying the owner and group. For example, you can set both to 'Administrators', or set the group to 'Users' depending on your security requirements. I'll make a note to document what modes mean in the Windows world. In the meantime, I'd recommend looking at this commit:42c998233ba188d94f4b903f802f075ffe87f0d6 Also, some minor updates where made here: commit:4c3aae84702225f441eb080ddbf6ff9121c1b49c and commit:d78afda39173d43d27ef6b84754490d5072a7ab6 ---------------------------------------- Bug #10586: Windows file provider produces error if source attribute used https://projects.puppetlabs.com/issues/10586 Author: Steve Shipway Status: Accepted Priority: Normal Assignee: Josh Cooper Category: windows Target version: 2.7.x Affected Puppet version: 2.7.6 Keywords: Branch: If you have a file resource pulling content from a puppet: URL, windows file provider gives error "Cannot convert Fixnum into string". The content is set correctly, but the permissions are not. C:\ems>puppet agent -t --environment=dev info: Caching catalog for emscmdprd01 info: Applying configuration version '1320628565' err: /Stage[main]//Node[emscmdprddrsdd]/File[C:/ems/certs/id_rsa.key]/ensure: ch ange from absent to file failed: Could not set 'file on ensure: can't convert Fi xnum into String at /etc/puppet/dev/manifests/nodes/systems/esg/ems.pp:160 notice: /Stage[main]//Node[emscmdprddrsdd]/File[C:/ems/certs/readme.txt]/ensure: defined content as '{md5}bcfdf561fb19f6a296f162d35cc0f9a6' notice: Finished catalog run in 55.56 seconds C:\ems>puppet --version 2.7.6 Manifest shows: node /^emscmd(prd|drs)\d\d$/ { $mycerts = 'C:/ems/certs' # This works file { "$mycerts/readme.txt": ensure=>'file', mode=>'666', group=>undef, owner=>'Administrators', content=>"Certificates Managed by Puppet"; } # This does not file { "$mycerts/id_rsa.key": ensure=>'file', mode=>'666', group=>undef, owner=>'Administrators', source=>"puppet:///files/ssh-keys/sitescope.private", } } I believe this might be connected with the Windows puppet agent attepting to set group ownership based on the file metadata (IE its group ownership under unix) and failing to make the conversion, but in any case this should give a meaningful message or default. We also need clearer documentation as to exactly what 'mode' means in the ACL world of Windows... -- 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.
