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

Apply jvm_nofiles_limit to systemd service #398

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nambrosch
Copy link

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
Copy link
Contributor

jmcnatt commented Sep 13, 2022

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
Copy link
Member

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
Copy link
Author

@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
Copy link
Member

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

@nambrosch
Copy link
Author

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

@jmcnatt
Copy link
Contributor

jmcnatt commented Sep 12, 2023

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

@danifr danifr mentioned this pull request Nov 6, 2023
@h-haaks
Copy link
Contributor

h-haaks commented Feb 12, 2024

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

@h-haaks
Copy link
Contributor

h-haaks commented Feb 13, 2024

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 h-haaks changed the title ulimit command does not apply to systemd services on all platforms Apply jvm_nofiles_limit to systemd service Feb 13, 2024
@h-haaks h-haaks added the bug Something isn't working label Feb 13, 2024
@nambrosch
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants