Skip to content

systemd: switch service from forking to simple (foreground)#824

Merged
pstorz merged 3 commits intomasterfrom
dev/joergs/master/systemd
Jun 21, 2021
Merged

systemd: switch service from forking to simple (foreground)#824
pstorz merged 3 commits intomasterfrom
dev/joergs/master/systemd

Conversation

@joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented May 27, 2021

The service type forking caused problems on newer systemd versions (Fedora 34).
Using type=simple and starting the daemons without forking
has the advantage,
that daemon messages to stdout and stderr are shown with systemctl status or journalctl.
This includes the daemon debug messages, when set into debug mode.

Removed the no longer supported (and never really used)
StandardOutput=syslog

Director: Exit code 1 is no longer treated as success.
This has been introduced as a workaround, but is no longer required.

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)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
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
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing
Tests
  • Decision taken that a system- or unittest is required (if not, then remove this paragraph)
  • The decision towards a systemtest is reasonable compared to a unittest
  • Testname matches exactly what is being tested
  • Output of the test leads quickly to the origin of the fault

@arogge arogge changed the title systemd: switch service from forking to simple (forground) systemd: switch service from forking to simple (foreground) Jun 10, 2021
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.

The commit messages are too wide, should be wrapped around 72 chars.

See: https://docs.bareos.org/DeveloperGuide/gitworkflow.html?highlight=commit%20messages#commit-message-guideline

Other than that everything looks good.

The service type forking caused problems on newer systemd versions
(Fedora 34).
Using type=simple and starting the daemons without forking
has the advantage, that daemon messages to stdout and stderr are shown
with systemctl status or journalctl.  This includes the daemon debug
messages, when set into debug mode.

Removed the PIDFile directive, as it is only required for Type=forking
and will be incorrect, as soon as listening port is changed in the
Bareos configuration.

Removed the no longer supported (and never really used) directive
StandardOutput=syslog

Director: Exit code 1 is no longer treated as success.  This has been
introduced as a workaround, but is no longer required.
It has been prepared for the Bareos daemon pid files,
but is no longer (or has never been) used.
@joergsteffens joergsteffens force-pushed the dev/joergs/master/systemd branch from 31ff869 to 4128f11 Compare June 14, 2021 14:43
@joergsteffens joergsteffens requested a review from pstorz June 14, 2021 14:43
@joergsteffens
Copy link
Member Author

Adapt the commit messages and rebased on master.

@pstorz pstorz merged commit 013de5b into master Jun 21, 2021
@pstorz pstorz deleted the dev/joergs/master/systemd branch June 21, 2021 10:15
frb121 pushed a commit that referenced this pull request Jun 21, 2021
pstorz added a commit that referenced this pull request Jun 29, 2021
As PR #824 was merged, we now are able to build Fedora34
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.

4 participants