Skip to content

dird: fix crash in .jobstatus#1278

Merged
arogge merged 3 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-dotstatus-crash
Oct 19, 2022
Merged

dird: fix crash in .jobstatus#1278
arogge merged 3 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-dotstatus-crash

Conversation

@arogge
Copy link
Member

@arogge arogge commented Oct 17, 2022

The .jobstatus command could crash the director. This PR fixes that crash and adds a test for it.

Thank you for contributing to the Bareos Project!

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

Previously if .jobstatus was called before another command in the same
UA had already opened the catalog, it would simply crash.
This patch reorders OpenClientDB() before the FillQuery() to avoid the
crash.
@alaaeddineelamri alaaeddineelamri self-assigned this Oct 19, 2022
@alaaeddineelamri alaaeddineelamri changed the title fix crash in .jobstatus dird: fix crash in .jobstatus Oct 19, 2022
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri left a comment

Choose a reason for hiding this comment

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

looks fine to me.
You can now add a changelog entry

@arogge arogge merged commit 72fdb8e into bareos:master Oct 19, 2022
@arogge arogge deleted the dev/arogge/master/fix-dotstatus-crash branch October 19, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants