voxpupuli / puppet-wildfly

Puppet module to install, configure and manage Wildfly (8/9/10+), JBoss EAP (6.1+/7.0+) and some Wildfly based products like apiman, Keycloak and Infinispan.
Apache License 2.0
29 stars 77 forks source link

Module configures service only as sysvinit, regardless of actual init system, when $version < 10 #311

Open EmersonPrado opened 8 months ago

EmersonPrado commented 8 months ago

Affected Puppet, Ruby, OS and module versions/distributions

All

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

In any OS with an init system other than sysvinit

class { 'wildfly':
  version        => '<Anything below 10>',
  ...
}

Actual results

Module tries to setup sysvinit service, then fails with:

Could not set 'file' on ensure: No such file or directory
A directory component in /etc/init.d/wildfly20231122-6980-19lb2fx.lock does not exist or is a dangling symbolic link
(file: /tmp/vagrant-puppet/modules-6aa599ec01948f6c0445cc68d9a925f4/wildfly/manifests/service/sysvinit.pp, line: 16)

Expected results

Service configured with correct init system

Additional information

Function service_config only returns init system as sysvinit when $version < 10

davidmaccode commented 2 months ago

Same here. But not only in Wildfly. Same Problem with jboss-eap on RHEL9.

The function returns the wrong init system template:

{service_name => jboss-eap, conf_file => /etc/default/jboss-eap.conf, conf_template => wildfly/wildfly.sysvinit.conf, service_file => bin/init.d/jboss-eap-rhel.sh}