consolidate: disable vfull duplicate job check#1739
Conversation
|
Are you still working on this PR as its labeled as draft ? |
Yes. I wanted to add systemtests to ensure that ignoreduplicatecheck is set for consolidate/migrate/copy jobs and works as intended, but haven't had the time yet. |
|
Hi @sebsura, the PR would now be ready for review whenever you have time. |
|
While this fixes the problem that you cannot start a virtual full job while another normal job is running, this does not fix the reverse: if you have a virtual full running, you still cannot start a normal job. I think the best approach to fix the second issue is to ignore jobs that ignore duplicates when checking for duplicates. Do you want to try to fix this ? |
Thanks for taking a look! Hm, not quite sure I follow. From my understanding IgnoreDuplicateJobChecking already goes both ways, no? What you're describing is what I'm testing in the added system tests: a consolidate job is started and then a normal job is started while the consolidate virtual full is still running. Usually the normal job would get cancelled. But after this change it is now no longer cancelled. |
|
Just realized that this change might actually cause an issue if you have consolidate jobs that are running for a long time. Currently, if you have a still running consolidate VF and then a new duplicate consolidation VF is started it would be cancelled if you have something like this: After this change this would of course no longer be the case because duplicate job checking is disabled. I guess duplicate consolidations could still be mitigated with setting It would probably be better to prevent duplicate/conflicting consolidation jobs in the first place, though. What do you think? |
You are right!
Ill have to think about that for a bit. The code is currently not set up in a way where you can inspect another jobs |
|
I would suggest that we check inside |
|
I've now also added a systemtest for the duplicate consolidation job cancellation. |
|
Ah whoops, only just now saw that the always-incremental-consolidate tests have been rewritten. I'll rebase the changes. |
9aba2a4 to
5f2b9c1
Compare
|
The changes look good. I split up your test as well. There is one thing im currently looking into and afterwards ill push my changes. |
3207b4c to
facd0bc
Compare
|
I squashed the fixup commits as well as fixing the copyright year on your new test (it was 2021-2024 before). |
|
Looks good to me, thanks! |
|
Hi! Are there problems with the tests? Or does the PR need some more changes? |
|
The PR is fine. Some weird errors popped up during the testing run. I am still trying to reproduce the issue. |
11728aa to
95d51b0
Compare
|
Just to give you a small update: Your tests found another bug that should be fixed by #1859 . As soon as that pr is merged, this should get merged as well. |
4cf97b8 to
3c1a189
Compare
This function is used to calculate the next jobid that will be given out by the director.
da6a67d to
768cf2e
Compare
Thank you for contributing to the Bareos Project!
This PR sets
IgnoreDuplicateJobChecking = truefor consolidate vfulls (i.e. just like migration/copy jobs).Currently consolidate vfulls also take part in the "Allow Duplicate Job" logic which can end up causing other jobs to be cancelled. In my opinion consolidation should not affect other jobs like that, and I can't currently think of a case where you would want it to.
I ran into this problem when my incremental jobs were being cancelled due to a long running consolidation job: https://groups.google.com/g/bareos-users/c/iqx4JSjSBxE
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
Tests