puppet-jira icon indicating copy to clipboard operation
puppet-jira copied to clipboard

Apply jvm_nofiles_limit to systemd service

Open nambrosch opened this issue 2 years ago • 9 comments

Services started with systemd on CentOS 7, and possibly other platforms ignore ulimit unless the LimitNOFILE parameter is set in the systemd unit file.

https://bugzilla.redhat.com/show_bug.cgi?id=754285

nambrosch avatar Mar 09 '22 21:03 nambrosch

Hey @root-expert or @bastelfreak - is it possible to get this fix in before the next release of the module?

This PR addresses the open file limits health check failure that could arise on systemd instances. https://confluence.atlassian.com/jirakb/health-check-open-files-limit-838555405.html

jmcnatt avatar Sep 13 '22 23:09 jmcnatt

Hello @nambrosch and @jmcnatt!

The patch seems okay but a unit test should be added before merging this. I think the unit test can be added in jira_service_spec file.

root-expert avatar Sep 18 '22 08:09 root-expert

@root-expert Thanks for reviewing this, I don't think the service spec file needs to be updated since adding LimitNOFILE adds any new requirements, it's part of systemd, and it uses the value of a puppet variable, $jira::jvm_nofiles_limit, that already exists.

nambrosch avatar Oct 05 '22 03:10 nambrosch

@nambrosch The unit tests for config files are mostly used to test something is render correctly to the file and it won't get broken in the future by some other contribution :smile:

root-expert avatar Oct 06 '22 16:10 root-expert

@root-expert It's not obvious to me what should be added. Any guidance that can be provided would be appreciated.

nambrosch avatar Aug 03 '23 21:08 nambrosch

@nambrosch @root-expert would this be as simple as adding a content line in ./spec/classes/jira_service_spec.rb?

jmcnatt avatar Sep 12 '23 16:09 jmcnatt

@nambrosch could you please rebase your branch against voxpupuli:master?

h-haaks avatar Feb 12 '24 14:02 h-haaks

Hmm, on Centos stream8, Ubuntu 18.04 and 20.04 this actually reduces the ulimit from 1048576 to 16384. Is this a breaking change then?

h-haaks avatar Feb 13 '24 10:02 h-haaks

@nambrosch could you please rebase your branch against voxpupuli:master?

all set. there are still some failing CI jobs but I don't believe they have anything to do with this PR.

nambrosch avatar Jun 12 '24 14:06 nambrosch