voxpupuli / puppet-jira

Atlassian JIRA Puppet Module
https://forge.puppet.com/puppet/jira
Apache License 2.0
62 stars 143 forks source link

Apply jvm_nofiles_limit to systemd service #398

Open nambrosch opened 2 years ago

nambrosch commented 2 years ago

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

jmcnatt commented 2 years ago

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

root-expert commented 2 years ago

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.

nambrosch commented 2 years ago

@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.

root-expert commented 2 years ago

@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:

nambrosch commented 1 year ago

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

jmcnatt commented 1 year ago

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

h-haaks commented 9 months ago

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

h-haaks commented 9 months ago

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?

nambrosch commented 5 months ago

@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.