Issue #11929 has been updated by Daniel Pittman.
Status changed from In Topic Branch Pending Review to Code Insufficient
I get a spec failure on MacOS running the tests after this change; I aborted at
the first failure:
<pre>
1) Puppet::Indirector::DirectFileServer when interacting with the filesystem
and the model should return an instance capable of returning its content
Failure/Error: instance.content.should == "my content"
No such file or directory - /path/to/my/file
# ./lib/puppet/util.rb:508:in `initialize'
# ./lib/puppet/util.rb:508:in `open'
# ./lib/puppet/util.rb:508:in `binread'
# ./lib/puppet/file_serving/content.rb:38:in `content'
# ./spec/integration/indirector/direct_file_server_spec.rb:29
</pre>
----------------------------------------
Bug #11929: Cannot serve local binary files on Windows
https://projects.puppetlabs.com/issues/11929
Author: Josh Cooper
Status: Code Insufficient
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.6
Keywords:
Branch: https://github.com/puppetlabs/puppet/pull/331
`Puppet::FileServing::Content.content` is not specifying binary mode when
reading its file. This is okay when the code runs on a Unix master. But if the
Windows agent is its own fileserver, such as retrieving files from a local
module, then the file is opened in text mode, which corrupts binaries.
To reproduce:
Given a module:
<pre>
C:\modules
└splunk
├files
│ splunk-4.2.4-110225-x64-release.msi
└manifests
init.pp
</pre>
Where init.pp is:
<pre>
class splunk {
file { 'c:\packages\splunk-4.2.4-110225-x64-release.msi':
ensure => present,
source => 'puppet:///modules/splunk/splunk-4.2.4-110225-x64-release.msi',
}
package { 'splunk':
ensure => installed,
provider => 'msi',
source => 'c:\packages\splunk-4.2.4-110225-x64-release.msi',
install_options => { 'INSTALLDIR' => 'C:\splunk' },
require => File['c:\packages\splunk-4.2.4-110225-x64-release.msi'],
}
}
</pre>
And site.pp:
<pre>
class { 'splunk': }
</pre>
Trying to apply the local module:
<pre>
puppet apply c:\modules\site.pp --modulepath c:/modules
</pre>
Puppet corrupts the file while copying it from the local file server:
<pre>
err: /Stage[main]/Splunk/Package[splunk]/ensure: change from absent to present
failed: Execution of 'msiexec.exe /qn /no
restart /i c:\packages\splunk-4.2.4-110225-x64-release.msi
INSTALLDIR=C:\splunk' returned 1620: T h i s i n s t a l l
a t i o n p a c k a g e c o u l d n o t b e o p e n e d . C o n t
a c t t h e a p p l i c a t i o n
v e n d o r t o v e r i f y t h a t t h i s i s a v a l i d W i
n d o w s I n s t a l l e r p a c k
a g e .
</pre>
--
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.