Ask Your Question
0

Windows puppet agent generates failed dependencies error

asked 2015-07-07 08:01:30 -0500

Goran40 gravatar image

Hello, when I run a short manifest

class jvclass { file { 'c:\Java': ensure => directory, } file { 'c:\Java\jre-8u45-windows-x64.exe ': ensure => present, source => 'puppet:///modules/jvclass/jre-8u45-windows-x64.exe ', } package { "jdk-8u45": ensure => installed, source => 'c:\Java\jre-8u45-windows-x64.exe ', install_options => ['/s','INSTALLDIR=c:\apps\Java\jre1.8.0_45'], require => File['c:\Java\jre-8u45-windows-x64.exe '], } }

on Windows agent by puppet agent --test, I got next error :

Error: /Stage[main]/Jvclass/File[c:\Java\jre-8u45-windows-x64.exe ]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/jvclass/jre-8u45-windows-x64.exe Notice: /Package[jdk-8u45]: Dependency File[c:\Java\jre-8u45-windows-x64.exe ] has failures: true Warning: /Package[jdk-8u45]: Skipping because of failed dependencies

Any idea how I could sort this ?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2015-07-08 11:41:55 -0500

Goran40 gravatar image

updated 2015-07-30 09:02:31 -0500

I looked on puppet agent logs in Control Panel - Administrative Tools - Event Viewer but I did not find more detailed information.
So I have simplified the init.pp file to just copy the file into a folder on windows agent like this:

class jvclass {

file { 'c:\Java': ensure => directory, }

file { 'c:\Java\jre-8u45-windows-x64.exe': ensure => present, source => 'puppet:///modules/jvclass/jre-8u45-windows-x64.exe', source_permissions => ignore } }

I was Surprised to see that is throwing an error even if rights on file are setup with chmod 777 Error is Error: /Stage[main]/Jvclass/File[c:\Java\jre-8u45-windows-x64.exe]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/jvclass/jre-8u45-windows-x64.exe

I tried to get rid of it but I couldn't. Can you give me a hint please?

Sorted with http://ask.puppetlabs.com/question/18...

edit flag offensive delete link more
0

answered 2015-07-10 08:48:05 -0500

Goran40 gravatar image

I jave included stdlib and granted rights to C:\Java folder by unchecking ReadOnly option. Then I have updated init.pp : class jvclass { file { 'c:\Java': ensure => directory, } -> acl { 'C:/java': permissions => { identity => 'Everyone', rights => ['read','execute'] } } file {'c:\Java\jdk-8u45-windows-x64.exe': source => 'puppet:///modules/jvclass/jdk-8u45-windows-x64.exe', ensure => 'present', source_permissions => 'ignore', } }

I got a new error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type acl at /etc/puppet/modules/jvclass/manifests/init.pp:12 on node mynode.xxxx.local Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Note: my node puppet version is 3.8.1

edit flag offensive delete link more
0

answered 2015-07-09 06:45:12 -0500

helge gravatar image

On Windows, you might try and check access rights to the folder you are creating:

file { 'c:\Java': ensure => directory, }

Unless you do not have any resource defaults, the installer might not be able to access the file?

On Winodws, I made the habit to always append acl{} to any directory creation; like:

file { 'c:/Java': ensure => directory, }
->
acl { 'C:/java': permissions  => { identity => 'Everyone', rights => ['read','execute'] }}

Please note, you need stdlib for type acl{}

HTH

edit flag offensive delete link more

Comments

Granted rights to C:\Java folder by uncheck ReadOnly , and I have updated manifest to class jvclass{ file { 'c:\Java': ensure => directory, }-> acl { 'C:/java': permissions => { identity => 'Everyone', rights => ['read','execute']} file {'c:\Java\jdk-8u45-windows-x64.exe': ...} I got this

Goran40 gravatar imageGoran40 ( 2015-07-09 14:24:14 -0500 )edit

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type acl at etc/puppet/modules/jvclass/manifests/init.pp:12 on node mynode.xxx.local Warning: Not using cache on failed catalog Error: Could not

Goran40 gravatar imageGoran40 ( 2015-07-09 14:25:27 -0500 )edit

... retrieve catalog. Note: my puppet agent version is 3.8.1 .. might be related to that?

Goran40 gravatar imageGoran40 ( 2015-07-09 14:26:05 -0500 )edit

noticed that other exe file from other module (etc/puppet/modules/team/file.exe) can be copied without problems but if I moved \jdk-8u45-windows-x64.exe to that location this has not been copied. Same if I copy an exe file which can be copied from another location in current one, it won't be copied

Goran40 gravatar imageGoran40 ( 2015-07-09 14:27:07 -0500 )edit

If I am not including acl in manifest: class jvclass{file { 'c:\Java':ensure => directory,} file {'c:\Java\jdk-8u45-windows-x64.exe': source => 'puppet:///modules/jvclass/jdk-8u45-windows-64.exe', ensure => 'present', source_permissions => 'ignore',} } Then I will get

Goran40 gravatar imageGoran40 ( 2015-07-09 14:44:25 -0500 )edit
0

answered 2015-07-07 14:59:25 -0500

cbarbour gravatar image

The error is because Puppet failed to deploy the file c:\Java\jre-8u45-windows-x64.exe. Check your logs to see what caused that deployment to fail and resolve the issue.

edit flag offensive delete link more

Comments

After many attempts of setting up manifest still cannot find a solution to this error: Error: /Stage[main]/Java/File[c:/Backs/jdk-8u51-windows-x64.exe]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/java/jdk-8u51-windows-x64.exe on next:

Goran40 gravatar imageGoran40 ( 2015-07-23 02:02:02 -0500 )edit

acl {'C:/Backs':permissions => [{identity => 'Everyone', rights => ['read', 'execute']}]} file {'c:/Backs/jdk-8u51-windows-x64.exe':source => 'puppet:///modules/java/jdk-8u51-windows-x64.exe',ensure => 'present',source_permissions => 'ignore',}

Goran40 gravatar imageGoran40 ( 2015-07-23 02:06:17 -0500 )edit

while this one .. works:

Goran40 gravatar imageGoran40 ( 2015-07-23 02:12:54 -0500 )edit

file{'c:\Tools':ensure=>directory,}acl{'C:/Tools':permissions => [{identity => 'Everyone', rights => ['read', 'execute']}]}file { 'c:/Tools/agentInstaller.exe':ensure => present,source => 'puppet:///modules/teamcity_agent/agentInstaller.exe',source_permmissions => ignore,require =>File['c:\Tools'],}

Goran40 gravatar imageGoran40 ( 2015-07-23 02:12:58 -0500 )edit

I have a puppet server with Centos 6.6 and I try to copy some files / directories over Windows agents but for some of them the above error is prompted .. even if I setup rights permissions with acl .. have any idea how this could be sorted? Let me know if you need any details

Goran40 gravatar imageGoran40 ( 2015-07-23 02:15:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-07 08:01:30 -0500

Seen: 297 times

Last updated: Jul 30 '15