jcr: fix some compiler warnings#1648
Merged
BareosBot merged 13 commits intobareos:masterfrom Feb 21, 2024
Merged
Conversation
f9b6cbe to
0304ad5
Compare
e62ede5 to
0cfa26d
Compare
pstorz
approved these changes
Feb 2, 2024
cfbff62 to
755af3c
Compare
ec27b00 to
d7345f3
Compare
d7345f3 to
d9a1b29
Compare
Sadly on the fd side there is no easy way to do it for each job automatically. At the moment I added it manually to backup and restore jobs. We will see if we want to add them somewhere else as well.
The test was comparing the number of files that the fd send to the sd (this is the number displayed in the backup summary) to the number of files that get restored (which is equal to the number of files that the sd sends to the director). This of course does not make sense and can cause problems if the cancel does not happen fast enough. Since in that case the fd might continue sending files to the sd with the sd never having the chance to send those to the director. The fix is simple: we need to check the backup log and add up all checkpoint batch inserts instead. This should be equal to the number of files that the sd send to the director. For easier debugging I also added tracing to the test.
Depending on where your source code is located, the regex replace may remove more than just the path prefix that we want to replace (e.g. source is located at /bareos -> bad replace for etc/bareos/...). Now ALL_FILES contains paths relative to CMAKE_SOURCE_DIR (that way we do not need to remove it anymore). To restore the previous behaviour we now just need to prepend the source directory again to get the CURRENT_FILE.
Trying to connect to a dead deamon takes around 15 secs, so doing it 20 times takes around 15 * 20 = 300 secs. Which means the test will time out, which is not very helpful. Now the test tries to wait for only the amount of time it was given (+- one extra attempt).
3ede91e to
6ad7644
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.
Thank you for contributing to the Bareos Project!
This PR fixes some compiler warnings related to
std::find_if()now being marked as[[nodiscard]].It also fixes some race conditions.
It also makes every daemon send a jobmessage with its version at the start of each job.
Additionally it adds tls kernel module detection the the ktls test. Now the test gets skipped if the module is not loaded.
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 lineRequired backport PRs have been createdSource code quality