Skip to content

Fix monit version fact - #71

Open
erik-frontify wants to merge 8 commits into
voxpupuli:masterfrom
erik-frontify:fix_monit_version_fact
Open

Fix monit version fact#71
erik-frontify wants to merge 8 commits into
voxpupuli:masterfrom
erik-frontify:fix_monit_version_fact

Conversation

@erik-frontify

Copy link
Copy Markdown

Pull Request (PR) description

Looks like monit version 6 has 3 digits to the version. At least on CentOS:

This is Monit version 6.0.0

So this PR adjusts the regex to still be able to see the current monit version

@erik-frontify

Copy link
Copy Markdown
Author

I can see why the test is failing. But the test looks for Amazon linux, that is not even configured in the params. So I'd say the test is wrong.

@erik-frontify
erik-frontify marked this pull request as ready for review July 15, 2026 08:15
@bastelfreak

Copy link
Copy Markdown
Member

@erik-frontify thanks for the PR! Could you please rebase and add a unit test for the new format?

@erik-frontify

Copy link
Copy Markdown
Author

Hey @bastelfreak, I didn't change anything on the format. AFAICT the configuration didn't change from monit 5 to monit 6. It just failed to gather the current monit version. Which is weird, as the fact regex should've failed before the update, as it was 3 digits before: This is Monit version 5.33.0
But since the upgrade we had the error Evaluation Error: Error while evaluating a Function Call, start_delay requires at least Monit 5.0. Detected version is <0.0>.
On Redhat 9 it worked, on CentOS Stream 9 it failed. But both are os.family RedHat, so the version should've been set to 5 through params.pp.
Still, the PR fixes this, as now the right version is detected.

The failing test is wrong IMO, as there is no case for Amazon Linux any more. I can provide a PR for that, just didn't want to mess with your tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants