Skip to content

fix runtime status#1872

Merged
BareosBot merged 6 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-runtime-status
Jul 12, 2024
Merged

fix runtime status#1872
BareosBot merged 6 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-runtime-status

Conversation

@arogge
Copy link
Member

@arogge arogge commented Jun 28, 2024

On a reload, resources (Job, Client and Storage) will get new runtime status objects. As those are used to track concurrent jobs and related things, this leads to all kinds of strange behaviours.
This PR registers the status objects by resource name, so on a reload a resource with the same name will get the same status object.

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)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
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
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

@arogge arogge added requires backport to 23 bug This addresses a bug labels Jun 28, 2024
@arogge arogge added this to the 24.0.0 milestone Jun 28, 2024
@arogge arogge requested review from pstorz and sebsura June 28, 2024 18:17
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.

Looks good!

@arogge arogge force-pushed the dev/arogge/master/fix-runtime-status branch from 9a6de22 to c3cf075 Compare July 1, 2024 11:29
@arogge arogge mentioned this pull request Jul 1, 2024
6 tasks
@arogge arogge requested a review from sebsura July 10, 2024 12:25
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

arogge added 5 commits July 12, 2024 11:19
* use std::mutex
* use destructor instead of manual teardown
* disable move/copy
without this patch a new configuration resource would also create a new
runtime status. This lead to all sorts of issues. Including, but not
limited to, wrong bookkeeping of concurrent jobs.
Instead of creating a new runtime status, we now pick an existing one
for the resource with the same name and only create a new one if we do
not have a status yet.
@arogge arogge force-pushed the dev/arogge/master/fix-runtime-status branch from d21622b to 1f9765c Compare July 12, 2024 09:19
@BareosBot BareosBot merged commit afbdb63 into bareos:master Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This addresses a bug requires backport to 23

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants