Skip to content

dird: do device reservation as late as possible, i.e. after run before job scripts#1273

Merged
pstorz merged 14 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5246-delay-device-reservation
Nov 30, 2022
Merged

dird: do device reservation as late as possible, i.e. after run before job scripts#1273
pstorz merged 14 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5246-delay-device-reservation

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Oct 6, 2022

Description

Bareos used to reserve the devices very early, even before the run before job scripts.
When the scripts are used to e.g. create a database dump which takes a very long time,
the storage device is blocked while no data is being written.

This PR makes sure devices are reserved at the latest time possible before starting the physical writing.

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
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
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
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch from a458656 to 7501c11 Compare October 7, 2022 12:08
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review October 13, 2022 10:51
@pstorz pstorz changed the title dird: delay device reservation when doing backup dird: do device reservation as late as possible Oct 19, 2022
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch from 7501c11 to 108a688 Compare October 25, 2022 16:23
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch from 108a688 to 5b19f52 Compare November 4, 2022 09:34
@pstorz pstorz changed the title dird: do device reservation as late as possible dird: do device reservation as late as possible, i.e. after run before job scripts Nov 7, 2022
@pstorz pstorz self-requested a review November 7, 2022 12:48
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.

I applied the bareos-check-sources changes.

I think it would make sense that we add the information to the documentation. that now the device reservation is done after the run before sciripts are completed

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch 2 times, most recently from bea156f to 731db20 Compare November 7, 2022 17:32
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch 2 times, most recently from 289d3e7 to 92fafcc Compare November 14, 2022 11:02
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch 2 times, most recently from a96f905 to 629b7ea Compare November 25, 2022 18:01
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.

Good work!

@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch from 9b2cfde to d38d352 Compare November 30, 2022 12:46
@pstorz pstorz enabled auto-merge November 30, 2022 12:46
@pstorz pstorz merged commit ebcab83 into bareos:master Nov 30, 2022
@pstorz pstorz deleted the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch December 5, 2022 08:29
@alaaeddineelamri alaaeddineelamri restored the dev/alaaeddineelamri/master/s5246-delay-device-reservation branch January 16, 2023 09:25
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.

2 participants