From f3c1c22e50dd7b9bbc389ef4dc081d09939f2892 Mon Sep 17 00:00:00 2001 From: Tero Pihlaja Date: Mon, 3 Jan 2022 14:45:47 +0200 Subject: [PATCH 1/2] Add support for Payara 5.2021.10 --- CHANGELOG.md | 3 +++ metadata.rb | 2 +- resources/domain.rb | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d370da0..97ed2a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.2.7: +* Enhance : Add support for Payara 5.2021.10 + ## v1.2.6: * Fix : Fix thread pool comparison in attribute driven domain diff --git a/metadata.rb b/metadata.rb index b689f0c0..f43093b3 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'peter@realityforge.org' license 'Apache-2.0' description 'Installs/Configures GlassFish Application Server' -version '1.2.6' +version '1.2.7' chef_version '>= 13.0' issues_url 'https://github.com/realityforge/chef-glassfish' diff --git a/resources/domain.rb b/resources/domain.rb index 2d54f2ac..52f38375 100644 --- a/resources/domain.rb +++ b/resources/domain.rb @@ -245,6 +245,9 @@ def default_logging_properties # Payara 5.192 'com.sun.enterprise.server.logging.GFFileHandler.logStandardStreams' => 'true', + # Payara 5.2021.10 + 'com.sun.enterprise.server.logging.GFFileHandler.fastLogging' => 'false', + # All log level details '.level' => 'INFO', From 6ea8a90cc6b6491529de09455964e878798add8e Mon Sep 17 00:00:00 2001 From: Tero Pihlaja Date: Tue, 30 Apr 2024 14:58:32 +0300 Subject: [PATCH 2/2] Chef 18 fixes --- CHANGELOG.md | 5 +++++ libraries/asadmin.rb | 22 +++++++++------------- metadata.rb | 4 ++-- resources/wait_for_glassfish.rb | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 862f9adc..f2b8954e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.3.0: +* Change : Drop support for older Chef client versions. Chef client 16+ required. +* Change : Add support for Chef-client 18 +* Change : Use localhost address for admin port availability polling instead of `node['ipaddress']` + ## v1.2.8: * Fix : Add asadmin execution rights to `node['glassfish']['user']` and `node['glassfish']['group']` diff --git a/libraries/asadmin.rb b/libraries/asadmin.rb index 68477afa..85cae3e8 100644 --- a/libraries/asadmin.rb +++ b/libraries/asadmin.rb @@ -64,27 +64,23 @@ def transform_jvm_options(options, withoutversions = false) end end - def self.pipe_filter(node, pattern, regexp: true, line: false) - case node['os'] - when 'linux' - switches = [ - regexp ? '' : '-F', - line ? '-x' : '', - ] - "grep #{switches.join(' ')} -- '#{pattern}'" - when 'windows' + def pipe_filter(pattern, test = nil, regexp: true, line: false) + Chef::Log.info pattern.inspect + if platform_family? 'windows' switches = [ regexp ? '/R' : '/L', line ? '/X' : '', ] "findstr #{switches.join(' ')} \"#{pattern}\"" + else + switches = [ + regexp ? '' : '-F', + line ? '-x' : '', + ] + "grep #{switches.join(' ')} -- '#{pattern}'" end end - def pipe_filter(pattern, regexp: true, line: false) - Asadmin.pipe_filter(node, pattern, regexp: regexp, line: line) - end - def asadmin_command(command, remote_command = true, params = {}) options = {} options[:remote_command] = remote_command diff --git a/metadata.rb b/metadata.rb index 3a264b92..28f32d6b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,8 +3,8 @@ maintainer_email 'peter@realityforge.org' license 'Apache-2.0' description 'Installs/Configures GlassFish Application Server' -version '1.2.8' -chef_version '>= 13.0' +version '1.3.0' +chef_version '>= 16.0' issues_url 'https://github.com/realityforge/chef-glassfish' source_url 'https://github.com/realityforge/chef-glassfish' diff --git a/resources/wait_for_glassfish.rb b/resources/wait_for_glassfish.rb index 6bc21c22..49213774 100644 --- a/resources/wait_for_glassfish.rb +++ b/resources/wait_for_glassfish.rb @@ -21,7 +21,7 @@ property :password_file, String, required: true # <> @attribute ipaddress The IP address to connect to glassfish. -property :ipaddress, String, default: lazy { node['ipaddress'] } +property :ipaddress, String, default: '127.0.0.1' # <> @attribute admin_port The port on which the web management console is bound. property :admin_port, Integer, default: 4848