voxpupuli / puppet-staging

⛔️ Deprecated in favor of puppet-archive
https://forge.puppet.com/puppet/archive
Apache License 2.0
51 stars 109 forks source link

staging doesn't work on puppet 2.7 on windows #26

Closed planet closed 10 years ago

planet commented 10 years ago

in https://github.com/nanliu/puppet-staging/blob/master/manifests/params.pp

lines 20-22 the mode, group and owner are defined which breaks folder permissioning and creates C:\ProgramData\staging but nothing can write or access it.

error I get:

rr: /Stage[main]/Firmware::Windows_gen8/Staging::File[hp_bl460_gen8_bios_12.20.2013.zip]/File[C:\ProgramData\staging
rmware]/ensure: change from absent to directory failed: Could not set 'directory on ensure: Permission denied - C:/Pr
amData/staging/firmware at /opt/puppet/environments/planet_firmware/modules/staging/manifests/file.pp:39
notice: /Stage[main]/Firmware::Windows_gen8/Staging::File[hp_bl460_gen8_bios_12.20.2013.zip]/Exec[C:\ProgramData\stag
/firmware/hp_bl460_gen8_bios_12.20.2013.zip]: Dependency File[C:\ProgramData\staging/firmware] has failures: true

If I try to set a staging directory by using target => in staging:file I get a different error:

err: Failed to apply catalog: Parameter cwd failed: cwd must be a fully qualified path at /opt/puppet/environments/pl
t_firmware/modules/staging/manifests/file.pp:93

@nanliu Is this a known issue for older versions of puppet for Windows? Does this work in the current version?

cc: @rismoney @jumanjiman

nanliu commented 10 years ago

I'm not sure the root cause for the first one, but sounds similar to this post: https://groups.google.com/forum/#!msg/puppet-users/zXpgBB9cZgE/3h1aSJvCNKgJ

The second might be addressed by #25. Sorry the Windows feature/PR is not something I'm able to review very well since it's not a platform I use/test. I'll trust the collective input from @reidmv and other users.

reidmv commented 10 years ago

25 does address the second error.

For the first error, yes, we should probably remove the mode parameter when operating on Windows. I'll submit a pull request shortly. Talking to Josh Cooper about whether or not it would be best to leave everything undef or explicitly set owner/group using well-known (static) SIDs to Administrators / Local System. PR will happen once I get that figured out.

planet commented 10 years ago

@nanliu @reidmv sounds good guys, i'll keep an eye out for any updates to address the issues. thanks for the attention on the matter..

reidmv commented 10 years ago

I've created a branch at https://github.com/reidmv/puppet-module-staging/compare/fix_windows_mode. I haven't had time to test it, but if it works I think it's the way to go.

nanliu commented 10 years ago

Tested and merged #33.

jumanjiman commented 10 years ago

@nanliu @reidmv Thanks for getting this in