daemons: set CLI11 error exit code to 41 and bareos config parsing error exit code to 42#1515
Merged
BareosBot merged 10 commits intobareos:masterfrom Sep 20, 2023
Conversation
190d721 to
48ed99d
Compare
48ed99d to
2db29de
Compare
15 tasks
cc8feac to
6e27aa9
Compare
arogge
requested changes
Sep 8, 2023
6e27aa9 to
a01fdc9
Compare
arogge
approved these changes
Sep 18, 2023
a01fdc9 to
3959187
Compare
Merged
15 tasks
3959187 to
83fce6d
Compare
- add After=local-fs.target - place StartLimitBurst=10 in service part instead unit - replace generic exit 1 by the specific configuration error exit code 42 and wrong command line parameter 41 - add comment about how to reset failed counter - reformat debian filedaemon service file Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
83fce6d to
7bdabc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When CLI11 exists on error, it produces a lot of different exit codes that are not always useful to us. Also configuration errors do not have a specific exit code.
This PR makes sure CLI11 error exit codes are overridden so that the daemons exit with a
41code no matter what the type of error is, as they are all command line parsing errors anyway. On top of that configuration, parsing errors will report a42code on exit.Please check
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-toolto have some simple automated checks run and a proper changelog record added.General
Check backport lineSource code quality