-
Notifications
You must be signed in to change notification settings - Fork 259
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
dird: cats: remove copy and migration jobs with no data from catalog #1262
dird: cats: remove copy and migration jobs with no data from catalog #1262
Conversation
859e9b5
to
e519ca6
Compare
8707e03
to
71230b6
Compare
3a7f61d
to
b578a1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good work! Just some small remarks
Suggestion for commit descripton of b578a1e :
"docs: MigrationAndCopy.rst: clarify that control job gets removed upon completition"
@@ -39,7 +39,7 @@ A migration job can be started manually or from a Schedule, like a backup job. I | |||
|
|||
Normally three jobs are involved during a migration: | |||
|
|||
- The Migration control Job which starts the migration child Jobs. | |||
- The Migration control Job which starts the migration child Jobs (removed upon completion). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the job also removed if completes with error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, do we want to add the information that the "migration child jobs" will be removed when the original jobid is removed from the database?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the job enters MigrationCleanup(...)
in migrate.cc:1659 at the end of the job, it will be deleted.
A migration cleanup is part of the natural cycle of the job, so whether successful or failed, it gets called, and thus the control job gets removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, do we want to add the information that the "migration child jobs" will be removed when the original jobid is removed from the database?
I'll see where I can fit that information in the docs
b578a1e
to
496a848
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. Reading the docs about the migration jobs I was not happy with how everything was described so I updated the docs. Could you please check if what I wrote makes sense?
use the PriorJobId field to store the migrated/copied jobid in order to keep track of it
use low job retention
3c85fa2
to
bff5f4d
Compare
bff5f4d
to
ee5d007
Compare
Thank you for contributing to the Bareos Project!
Description
Copy and migration jobs always leave empty jobs behind in the catalog even after volume pruning. Those jobs can only be removed manually or with job pruning.
This PR makes sure:
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)
General
Source code quality
bareos-check-sources --since-merge
does not report any problemsTests