puppet-wildfly icon indicating copy to clipboard operation
puppet-wildfly copied to clipboard

Initial install fails because /var/cache/wget does not exist.

Open nvergottini opened this issue 7 years ago • 8 comments

Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /var/cache/wget/wildfly-10.1.0.Final.tar.gz20170501-21551-1j8ydz8.lock at /etc/puppetlabs/code/environments/shop_dev/modules/wildfly/manifests/install.pp:12

Creating /var/cache/wget fixed the issue.

nvergottini avatar May 01 '17 16:05 nvergottini

Thanks for pointing this out.

That's kind of odd, which Linux distribution/version are you using?

jairojunior avatar May 01 '17 16:05 jairojunior

Oracle Linux 7.3

nvergottini avatar May 01 '17 16:05 nvergottini

Just tested with OEL 7.3, and included a respective nodeset (https://github.com/biemond/biemond-wildfly/blob/master/spec/acceptance/nodesets/oel-73-x64.yml) to my test matrix.

Unfortunately, I couldn't catch this error, so, let me suggest a few alternatives:

  • Change cache_dir parameter in wildfly class to a directory more suitable for you.
  • Create cache_dir before wildfly class. (i.e. file { '/var/cache/wget': })
  • Let's change default value of /var/cache/wget to some other thing, since wget is not used anymore.

jairojunior avatar May 02 '17 13:05 jairojunior

Thanks. I will probably just modify cache_dir.

I think issue might be because our standard Oracle Linux install is just the core installation.

nvergottini avatar May 02 '17 17:05 nvergottini

I see. I'll leave this open since /var/cache/wget does not make sense anymore.

jairojunior avatar May 02 '17 23:05 jairojunior

centos 7 also uses wget, same error. i just changed the cache dir to /var/cache to work arround it.

Possible solution would be something like: manage_cache_dirs And then create them if they don't exists.

BobVanB avatar Jun 01 '17 07:06 BobVanB

For what it's worth, I just hit the same error on a fresh install attempt on CentOS 7.3 with Puppet 5.3.3.

So like @BobVanB suggested, if the module is going to default to /var/cache/wget, then it should ensure that directory exists.

Edit: As an alternative, maybe the 'puppet-archive' module should be used instead?

fatmcgav avatar Feb 05 '18 13:02 fatmcgav

@fatmcgav +1 for puppet-archive. I also have abandoned wget.

BobVanB avatar Feb 05 '18 15:02 BobVanB

problem should be solved, and/or can be mitigated by using code like this:

class { 'wildfly':
  version           => '23.0.2',
  init_system       => 'systemd',
  install_source    => 'https://download.jboss.org/wildfly/23.0.2.Final/wildfly-23.0.2.Final.tar.gz',
  install_cache_dir => '/tmp',
  java_home         => '/usr/lib/jvm/java-17-openjdk-amd64',
}

rwaffen avatar Oct 27 '23 09:10 rwaffen