voxpupuli/puppet-archive

Archive resource seems to work with 'puppet apply' but not with 'puppet agent'

adfel70 opened this issue · 4 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.13.0
  • Ruby: 2.5.7
  • Distribution: RHEL7 x86_64
  • Module version: 4.6.0

How to reproduce (e.g Puppet code you use)

execute agent run using puppet agent --test command with the following resource included inside the manifest:

archive { '/target/filename.tgz':
  ensure => present,
  source  => 'http://file/url/location/filename.tgz',
}

What are you seeing

File /target/filename.tgz does not exist even though manifest applied successfully without any error.
(source url is valid and unbroken....)

What behaviour did you expect instead

filename.tgz downloaded under /target directory.

Any additional information you'd like to impart

We are using Puppet with master-agents configuration and we issued this behavior while testing new versions.
Using puppetserver 6.13 with puppet-agent 5.5 seems to work. Using puppet-agent version 6.0.0 and up reproduces the described behavior.

Server has one environment (production) with 3 modules:

  • dalen-puppetdbquery v3.0.1
  • puppet-archive v4.6.0
  • puppetlabs-stdlib v6.5.0

Even though we have only one environment and seems unrelated, tried also executing

puppet generate types

But still got the same behavior. Any idea?
Thanks.

Would you be able to paste the output of puppet agent -t --debug?

archive { '/target/filename.tgz':
  enssure => present,
  source  => 'http://file/url/location/filename.tgz',
}

I'm guessing that ensure typo is just in this GitHub issue, not in your actual code?

archive { '/target/filename.tgz':
  enssure => present,
  source  => 'http://file/url/location/filename.tgz',
}

I'm guessing that ensure typo is just in this GitHub issue, not in your actual code?

Yea sorry about that (I cannot copy-paste the code, had to write it manually)

Would you be able to paste the output of puppet agent -t --debug?

Sorry, cant provide the output due to technical limitations (our environment has no internet access...).
I Couldn't find anything relevant though:
puppet agent -t --debug|grep -i archive
or
puppet agent -t --debug|grep -i filename
showed nothing. It seems like the resource is not even being called, but when I deliberately type incorrect parameter name, like:

archive { '/target/filename.tgz':
  ensure  => present,
  sourceX => 'http://file/url/location/filename.tgz',
}

An error is returned as expected

Server Error: no parameter named 'sourceX' on Archive[/target/filename.tgz]

Is there something specific that may be relevant to look for in --debug output?
Thanks again.