Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with custom fact icinga2_version for older versions of Icinga 2 #718

Closed
misaflo opened this issue Jan 3, 2023 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@misaflo
Copy link

misaflo commented Jan 3, 2023

Expected Behavior

No error with custom fact icinga2_version

Current Behavior

On Rocky Linux 8.7 since puppet-icinga2 3.5, I have this error:

Error: Facter: Error while resolving custom fact fact='icinga2_version', resolution='<anonymous>': undefined method `[]' for nil:NilClass

Your Environment

  • Module version (puppet module list): v3.5.1
  • Puppet version (puppet -V): 7.21.0
  • Operating System and version: Rocky Linux release 8.7 (Green Obsidian)
@lbetz
Copy link
Contributor

lbetz commented Jan 3, 2023

Hi,

I am using a puppet server 7.20.0 and a Rocky 8.6 in my environment, I haven't problems. I get the following on my rocky based agent:
$ facter -p icinga2_version
2.13.6

@misaflo
Copy link
Author

misaflo commented Jan 4, 2023

The version differ in Rocky Linux.

In Debian, I have the release version with 'r':

sudo icinga2 -V | grep '(version: '
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.5-1)

In Rocky, I have not the 'r':

sudo icinga2 -V | grep '(version: '
icinga2 - The Icinga 2 network monitoring daemon (version: 2.13.2-1)

Icinga 2.13.2 is the latest available in the repo for CentOS 8.

So the icinga2 -V|grep 'version: r' in lib/facter/icinga2_version.rb does not works

@lbetz
Copy link
Contributor

lbetz commented Jan 4, 2023

Strange, I think ist an Icinga version problem.... ok, so r has to be handle separately.
For Enterprise Linux, Icinga only serves the current (newer than 2.13.2) packages via a supcription, see https://icinga.com/subscription/

@lbetz lbetz changed the title Error with custom fact icinga2_version on Rocky Linux Error with custom fact icinga2_version Jan 4, 2023
@lbetz lbetz added the bug label Jan 4, 2023
@lbetz
Copy link
Contributor

lbetz commented Jan 4, 2023

Also unit tests have to be done.

@lbetz lbetz changed the title Error with custom fact icinga2_version Error with custom fact icinga2_version for older versions Jan 4, 2023
@lbetz lbetz changed the title Error with custom fact icinga2_version for older versions Error with custom fact icinga2_version for older versions of Icinga 2 Jan 4, 2023
@lbetz lbetz self-assigned this Jan 4, 2023
@lbetz lbetz added this to the v3.5.2 milestone Jan 4, 2023
@lbetz lbetz closed this as completed in 3f9464e Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants