Issue #11563 has been updated by Feifei Jia.

Thanks you guys for quick response.

I use the puppetlabs-puppet-2.7.9-153-gac8b408.zip from your link. The "can't 
convert Fixnum into String" error disappeared after specifying user/group info. 
But the exexutable script created from template still had problems:

<pre>
err: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/Exec[setup_env.bat]/returns: change from notrun to 0 failed: Permission 
denied - C:/Users/ADMINI~1/AppData/Local/Temp/puppet20120105-4708-lrk2zc-0
debug: /Schedule[never]: Skipping device resources because running on a host
debug: Mca::Set_role[for ie]: The container Node[ip-xxxxxxxx.ec2.internal] will 
propagate my refresh event
debug: Node[ip-xxxxxxxx.ec2.internal]: The container Class[Main] will propagate 
my refresh event
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Class[Main]: The container Stage[main] will propagate my refresh event
debug: Finishing transaction 36558996
debug: Storing state
info: Creating state file C:/ProgramData/PuppetLabs/puppet/var/state/state.yaml
debug: Stored state in 0.04 seconds
notice: Finished catalog run in 9.72 seconds
debug: 
/File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:
 content changed '{md5}a6da13a64979f67fc98de84838845a69' to 
'{md5}09c1a03433847b672978ca2aeba97f07'
debug: Finishing transaction 79198752
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, 
using default (marshal)
debug: report supports formats: b64_zlib_yaml marshal raw yaml; using marshal
</pre>

After add owner info to template:

<pre>
        file { 'c:\download\setup_env.bat':
            ensure => file,
            owner => 'Administrator',
            group => 'Administrators',
            provider => windows,
            content => template("mca/setup_env.bat.erb"),
        }
</pre>

It worked well:

<pre>
notice: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/File[c:\download\setup_env.bat]/owner: owner changed 'Administrators' to 
'Administrator'
notice: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/File[c:\download\setup_env.bat]/group: group changed 
'S-1-5-21-1743719720-102612172-403029982-513' to 'Administrators'
debug: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/File[c:\download\setup_env.bat]: The container Mca::Set_role[for ie] will 
propagate my refresh event
debug: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/File[c:\download\setup_env.bat]: The container Mca::Set_role[for ie] will 
propagate my refresh event
debug: Exec[setup_env.bat](provider=windows): Executing 'setup_env.bat'
debug: Executing 'setup_env.bat'
notice: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/Exec[setup_env.bat]/returns: executed successfully
debug: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Mca::Set_role[for 
ie]/Exec[setup_env.bat]: The container Mca::Set_role[for ie] will propagate my 
refresh event
debug: /Schedule[never]: Skipping device resources because running on a host
debug: Mca::Set_role[for ie]: The container Node[ip-xxxxxxxx.ec2.internal] will 
propagate my refresh event
debug: Node[ip-xxxxxxxx.ec2.internal]: The container Class[Main] will propagate 
my refresh event
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Class[Main]: The container Stage[main] will propagate my refresh event
debug: Finishing transaction 35568084
debug: Storing state
debug: Stored state in 0.02 seconds
notice: Finished catalog run in 3.66 seconds
debug: 
/File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:
 content changed '{md5}09c1a03433847b672978ca2aeba97f07' to 
'{md5}3d1dc6bf0b401cadb4ea2dd9ac656668'
debug: Finishing transaction 78853056
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, 
using default (marshal)
debug: report supports formats: b64_zlib_yaml marshal raw yaml; using marshal
</pre>
----------------------------------------
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.

Reply via email to