From 6ebfc4c46adebfa08aca24e5d2e4e64022b7b881 Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:46:43 +0200 Subject: [PATCH 1/5] fix(packaging): fix as400 packaging (#5248) --- .../init-script/centreon-as400-sysconfig | 2 +- as400/packaging/centreon-as400-daemon.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/as400/connector.as400.install/init-script/centreon-as400-sysconfig b/as400/connector.as400.install/init-script/centreon-as400-sysconfig index 1c52ce76e1..7b02f00142 100644 --- a/as400/connector.as400.install/init-script/centreon-as400-sysconfig +++ b/as400/connector.as400.install/init-script/centreon-as400-sysconfig @@ -1,5 +1,5 @@ # centreon-as400 command line options -JAVA_OPTS="-Xms128M -Xmx2G -XX:MaxPermSize=128m" +JAVA_OPTS="-Xms128M -Xmx2G" CONNECTOR_OPTS="--port 8091" CONNECTOR_HOME=@CONNECTOR_HOME@ CONNECTOR_ETC=@CONNECTOR_ETC@ diff --git a/as400/packaging/centreon-as400-daemon.yaml b/as400/packaging/centreon-as400-daemon.yaml index 608bb67751..212db0103f 100644 --- a/as400/packaging/centreon-as400-daemon.yaml +++ b/as400/packaging/centreon-as400-daemon.yaml @@ -28,17 +28,20 @@ contents: mode: 0644 - src: "../connector.as400.install/init-script/centreon-as400-sysconfig" - dst: "/etc/sysconfig/centreon-as400-sysconfig" + dst: "/etc/sysconfig/centreon-as400" + type: config|noreplace file_info: mode: 0644 - src: "../connector.as400.install/etc/config.properties" dst: "/etc/centreon-as400/config.properties" + type: config|noreplace file_info: mode: 0644 - src: "../connector.as400.install/etc/log4j2.xml" dst: "/etc/centreon-as400/log4j2.xml" + type: config|noreplace file_info: mode: 0644 From 2ceae201e9afdd01886b5177dc032e1b6b02a851 Mon Sep 17 00:00:00 2001 From: omercier <32134301+omercier@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:14:46 +0200 Subject: [PATCH 2/5] fix(vmware-daemon): fix the case-sensitiveness regression on containers (#5247) --- connectors/vmware/changelog | 4 ++++ connectors/vmware/src/centreon/script/centreon_vmware.pm | 9 ++++++++- connectors/vmware/src/centreon/script/centreonvault.pm | 4 ++-- connectors/vmware/src/centreon/vmware/common.pm | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/connectors/vmware/changelog b/connectors/vmware/changelog index e96a926faf..f77e4006f8 100644 --- a/connectors/vmware/changelog +++ b/connectors/vmware/changelog @@ -1,3 +1,7 @@ +2024-10-18 Olivier Mercier - 3.3.2 + * Fix: regression of case sensitiveness for container names fixed + * Enhancement: log messages related to the vault have been downgraded from error to info level or explained as safe to ignore if not using the vault + 2024-10-10 Olivier Mercier - 3.3.1 * Fix: add missing centreonvault.pm file to packaging diff --git a/connectors/vmware/src/centreon/script/centreon_vmware.pm b/connectors/vmware/src/centreon/script/centreon_vmware.pm index 7cf1e9a37b..90b73c3f90 100644 --- a/connectors/vmware/src/centreon/script/centreon_vmware.pm +++ b/connectors/vmware/src/centreon/script/centreon_vmware.pm @@ -54,7 +54,7 @@ BEGIN { use base qw(centreon::vmware::script); -my $VERSION = '3.3.1'; +my $VERSION = '3.3.2'; my %handlers = (TERM => {}, HUP => {}, CHLD => {}); my @load_modules = ( @@ -158,6 +158,13 @@ sub read_configuration { our %centreon_vmware_config; # loads the .pm configuration (compile time) require($self->{opt_extra}) or $self->{logger}->writeLogFatal("There has been an error while requiring file " . $self->{opt_extra}); + # We want all the keys to be lowercase + for my $conf_key (keys %{$centreon_vmware_config{vsphere_server}}) { + if ($conf_key ne lc($conf_key)) { + $self->{logger}->writeLogDebug("The container $conf_key has capital letters. We convert it to lower case."); + $centreon_vmware_config{vsphere_server}->{lc($conf_key)} = delete $centreon_vmware_config{vsphere_server}->{$conf_key}; + } + } # Concatenation of the default parameters with the ones from the config file $self->{centreon_vmware_config} = {%{$self->{centreon_vmware_default_config}}, %centreon_vmware_config}; } elsif ($self->{opt_extra} =~ /.*\.json$/i) { diff --git a/connectors/vmware/src/centreon/script/centreonvault.pm b/connectors/vmware/src/centreon/script/centreonvault.pm index 7acc97e5e3..47164af79e 100644 --- a/connectors/vmware/src/centreon/script/centreonvault.pm +++ b/connectors/vmware/src/centreon/script/centreonvault.pm @@ -42,7 +42,7 @@ sub new { if ( !$self->init() ) { $self->{enabled} = 0; - $self->{logger}->writeLogError("An error occurred in init() method. Centreonvault cannot be used."); + $self->{logger}->writeLogInfo("Something happened during init() method that makes Centreonvault not usable. Ignore this if you don't use Centreonvault."); } return $self; } @@ -86,7 +86,7 @@ sub check_options { } if ( ! -f $self->{config_file} ) { $self->{logger}->writeLogError("The given configuration file " . $self->{config_file} - . " does not exist. Centreonvault cannot be used."); + . " does not exist. Passwords won't be retrieved from Centreonvault. Ignore this if you don't use Centreonvault."); return undef; } diff --git a/connectors/vmware/src/centreon/vmware/common.pm b/connectors/vmware/src/centreon/vmware/common.pm index aaf1d8039f..bf5aac9c54 100644 --- a/connectors/vmware/src/centreon/vmware/common.pm +++ b/connectors/vmware/src/centreon/vmware/common.pm @@ -45,7 +45,7 @@ sub init_response { my (%options) = @_; $manager_response->{code} = 0; - $manager_response->{vmware_connector_version} = '3.3.0'; + $manager_response->{vmware_connector_version} = '3.3.2'; $manager_response->{short_message} = 'OK'; $manager_response->{extra_message} = ''; $manager_response->{identity} = $options{identity} if (defined($options{identity})); From b0e8c360f5d2439f56593fc56c18ba08982a4550 Mon Sep 17 00:00:00 2001 From: pkippes <144150042+pkippes@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:54:26 +0200 Subject: [PATCH 3/5] bump as400 --- as400/connector.as400/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/as400/connector.as400/pom.xml b/as400/connector.as400/pom.xml index d6cb9844d4..504da4833d 100644 --- a/as400/connector.as400/pom.xml +++ b/as400/connector.as400/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.centreon.connector centreon-as400 - 2.0.4 + 2.0.5 Centreon-AS/400 Connecteur AS/400 jar From af9df10066b04aa6e1eb6c5e4318d9cf6fe3869a Mon Sep 17 00:00:00 2001 From: pkippes <144150042+pkippes@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:55:04 +0200 Subject: [PATCH 4/5] Update centreon-as400-daemon.yaml bump --- as400/packaging/centreon-as400-daemon.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/as400/packaging/centreon-as400-daemon.yaml b/as400/packaging/centreon-as400-daemon.yaml index 212db0103f..4a9183a10a 100644 --- a/as400/packaging/centreon-as400-daemon.yaml +++ b/as400/packaging/centreon-as400-daemon.yaml @@ -2,7 +2,7 @@ name: "centreon-plugin-Operatingsystems-AS400-daemon" arch: "${ARCH}" platform: "linux" version_schema: "none" -version: "2.0.4" +version: "2.0.5" release: "${RELEASE}${DIST}" section: "default" priority: "optional" @@ -69,4 +69,4 @@ rpm: summary: Centreon AS 400 Plugin daemon signature: key_file: ${RPM_SIGNING_KEY_FILE} - key_id: ${RPM_SIGNING_KEY_ID} \ No newline at end of file + key_id: ${RPM_SIGNING_KEY_ID} From 2249d431b5ff70e7d01095787166f8b376355085 Mon Sep 17 00:00:00 2001 From: pkippes <144150042+pkippes@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:56:58 +0200 Subject: [PATCH 5/5] bump AS400: Update changelog --- as400/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/as400/changelog b/as400/changelog index 88225177e5..cd263672d9 100644 --- a/as400/changelog +++ b/as400/changelog @@ -1,3 +1,6 @@ +2024-10-18 Pieter Kippes - 2.0.5 + * Fixed packaging for config files + 2024-10-11 Olivier Mercier - 2.0.4 * Use io.undertow 2.3.17