puppetlabs / r10k

Smarter Puppet deployment
Other
800 stars 353 forks source link

DSC module won't deploy on Windows Server 2019 #1117

Closed dylanratcliffe closed 3 years ago

dylanratcliffe commented 3 years ago

When deploying a Puppetfile containing the puppetlabs/dsc module in Windows Server 2019 I get the following error:

PS C:\Users\vagrant\test>  r10k puppetfile install --color --force --verbose debug --trace
[2021-01-07 12:36:36 - INFO] Using Puppetfile 'C:/Users/vagrant/test/Puppetfile'
[2021-01-07 12:36:36 - DEBUG] Updating modules with 4 threads
[2021-01-07 12:36:36 - DEBUG] Module thread 1440 exiting: queue empty
[2021-01-07 12:36:36 - INFO] Updating module C:/Users/vagrant/test/modules/dsc
[2021-01-07 12:36:36 - DEBUG] Module thread 1460 exiting: queue empty
[2021-01-07 12:36:36 - DEBUG] Module thread 1480 exiting: queue empty
[2021-01-07 12:36:45 - ERROR] No such file or directory @ rb_sysopen - C:/Users/vagrant/AppData/Local/Temp/1/d20210107-2976-1cidwol/puppetlabs-dsc-1.9.4/puppetlabs-dsc-1.9.4/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstallLanguagePack/MSFT_OfficeOnlineServerInstallLanguagePack.schema.mof
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:214:in `initialize'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:214:in `open'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:214:in `extract_file'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:145:in `extract_entry'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar.rb:258:in `block (2 levels) in unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:94:in `block in each_entry'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/reader.rb:241:in `block in each_entry'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/reader.rb:222:in `loop'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/reader.rb:222:in `each_entry'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:93:in `each_entry'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar.rb:256:in `block in unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar/input.rb:27:in `open'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/minitar-0.9/lib/archive/tar/minitar.rb:249:in `unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/puppet_forge-2.3.4/lib/puppet_forge/tar/mini.rb:18:in `block in unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/puppet_forge-2.3.4/lib/puppet_forge/tar/mini.rb:16:in `open'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/puppet_forge-2.3.4/lib/puppet_forge/tar/mini.rb:16:in `unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/puppet_forge-2.3.4/lib/puppet_forge/unpacker.rb:40:in `unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/puppet_forge-2.3.4/lib/puppet_forge/unpacker.rb:15:in `unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/forge/module_release.rb:197:in `unpack'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/forge/module_release.rb:91:in `install'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/module/forge.rb:153:in `install'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/module/forge.rb:48:in `sync'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/action/puppetfile/install.rb:36:in `visit_module'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/action/visitor.rb:24:in `visit'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/module/base.rb:91:in `accept'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/puppetfile.rb:240:in `block (2 levels) in visitor_thread'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/puppetfile.rb:240:in `each'
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/r10k-3.7.0/lib/r10k/puppetfile.rb:240:in `block in visitor_thread'
[2021-01-07 12:36:45 - DEBUG] Module thread 1960 exiting: queue empty

The Puppetfile I'm using is simply:

mod 'puppetlabs/dsc', '1.9.4'

Expected Behavior

r10k should deploy the module

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new folder with a Puppetfile containing the above
  2. Run r10k puppetfile install --color --force --verbose debug --trace

Environment

Tested manually using the peru/windows-server-2019-datacenter-x64-eval vagrant box. Can also be tested using the windows-latest image in github actions

github-actions[bot] commented 3 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

binford2k commented 3 years ago

@dylanratcliffe did you enable long path support?

Magisus commented 3 years ago

I think this a bug in the forge gem and not r10k. We could try to work around the error in r10k, but if the unpacking of the tarball is failing, I'm not sure how much we can do...

binford2k commented 3 years ago

IAC & the Agent team are working on the minitar issue because it's blocking the new DSC modules. I'd like to keep this open to track r10k as a dependency of that effort, but I don't expect much lift from your end.

dylanratcliffe commented 3 years ago

I don't have time at the moment to test long path support but someone motivated could do it with GitHub actions pretty easily

binford2k commented 3 years ago

@michaeltlombardi just validated. This is a problem even with long paths enabled

github-actions[bot] commented 3 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

binford2k commented 3 years ago

We have contributed a fix to upstream ruby that enables long path support for Ruby applications. This was vendored into our own vendored Ruby runtimes and shipped in Puppet 6.23.0 and 7.8.0.

I just validated and this Puppetfile installs properly on Win 2019 with long path support enabled.