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

packaging: systemd unit: set a limit of restart #1450

Conversation

bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Apr 18, 2023

We want to enable automatic restart of daemon, but with a certain limit.
This will avoid constant crashing of daemon, which need an administrative review of their configuration.
We insert a limit burst of ten restart per day after a three minutes wait.

We also insert an increase in nb of open files
We add the conditional test for working directory on all daemons

OP#5453 OP#5461

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@bruno-at-bareos bruno-at-bareos marked this pull request as draft April 20, 2023 10:01
mschiff pushed a commit to mschiff/bareos that referenced this pull request Apr 20, 2023
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/packaging-service-limit-number-of-restart branch 2 times, most recently from 6bb2c49 to e2a1457 Compare April 24, 2023 12:22
@bruno-at-bareos bruno-at-bareos marked this pull request as ready for review April 24, 2023 14:40
@pstorz pstorz changed the title packaging: systemd unit set a limit of restart packaging: systemd unit: set a limit of restart May 4, 2023
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Please see suggested changes!

core/platforms/systemd/bareos-dir.service.in Outdated Show resolved Hide resolved
core/platforms/systemd/bareos-dir.service.in Outdated Show resolved Hide resolved
core/platforms/systemd/bareos-fd.service.in Outdated Show resolved Hide resolved
core/platforms/systemd/bareos-sd.service.in Outdated Show resolved Hide resolved
core/platforms/systemd/bareos-sd.service.in Outdated Show resolved Hide resolved
debian/bareos-filedaemon.service.in Outdated Show resolved Hide resolved
debian/bareos-filedaemon.service.in Outdated Show resolved Hide resolved
debian/bareos-storage.service.in Outdated Show resolved Hide resolved
debian/bareos-storage.service.in Outdated Show resolved Hide resolved
pull_request_template.md Outdated Show resolved Hide resolved
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/packaging-service-limit-number-of-restart branch 2 times, most recently from 4b0bc41 to b275c75 Compare May 8, 2023 07:18
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Work!

@pstorz pstorz force-pushed the dev/bruno/master/packaging-service-limit-number-of-restart branch from b275c75 to 04ad073 Compare May 15, 2023 09:05
bruno-at-bareos and others added 5 commits May 15, 2023 11:05
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- insert a limit burst of ten restart per day after a three minutes
  wait.
- increase allowed number of open files with LimitNOFILE=8192:524288
  we are not limited by select(2) 1024 limit.
- Add ConditionPathIsDirectory=@working_dir@ to sd,fd service

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: Philipp Storz <philipp.storz@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@pstorz pstorz force-pushed the dev/bruno/master/packaging-service-limit-number-of-restart branch from a5592d9 to b28f797 Compare May 15, 2023 09:06
@pstorz pstorz merged commit 57a4e68 into bareos:master May 15, 2023
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/packaging-service-limit-number-of-restart branch June 12, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants