Skip to content

Fix warning about missing delcandidates table in director#1721

Merged
BareosBot merged 3 commits intobareos:masterfrom
smarsching:fix-catalog-delcandiates-warning
Mar 20, 2024
Merged

Fix warning about missing delcandidates table in director#1721
BareosBot merged 3 commits intobareos:masterfrom
smarsching:fix-catalog-delcandiates-warning

Conversation

@smarsching
Copy link
Contributor

@smarsching smarsching commented Feb 28, 2024

Pruning jobs would cause the following warning in the output of the director (e.g. visible through systemctl status bareos-director.service):

table "delcandidates" does not exist, skipping

This warning is harmless but clutters the output. With this PR, this problem is fixed by disabling warnings for the PostgreSQL connection that is established by the director.

See https://bugs.bareos.org/view.php?id=1561 and https://bugs.bareos.org/view.php?id=1606.

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.

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
  • Check backport line
  • Required backport PRs have been created
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

Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

Thank you very much for taking the time working on this.
While the solution is probably correct (i.e. setting client_min_messages to WARNING), I would want you to implement it differently.

@arogge arogge self-assigned this Feb 29, 2024
@smarsching smarsching force-pushed the fix-catalog-delcandiates-warning branch from d747091 to 585aa23 Compare February 29, 2024 10:56
@bruno-at-bareos bruno-at-bareos requested a review from arogge March 6, 2024 09:12
@arogge
Copy link
Member

arogge commented Mar 20, 2024

I really don't know why we have three instances of that initialization code, but I'll try to replicate your change to the others.

@smarsching
Copy link
Contributor Author

Sorry, I force pushed the change a few weeks ago but forgot to write comment. Please have a look whether it now is now done at the correct location.

Copy link
Member

@arogge arogge 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. Thanks for taking the time to do this!

I removed an unused function (that would have require the same change) and added your change to the reconnect initialization, too.
If you're still happy with it, I'll accept the changes and backport them to Bareos 23.

smarsching and others added 3 commits March 20, 2024 09:46
Pruning jobs would cause the following warning in the output of the
director (e.g. visible through
“systemctl status bareos-director.service”):

  table "delcandidates" does not exist, skipping

This warning is harmless but clutters the output. With this commit, this
problem is fixed by disabling warnings for the PostgreSQL connection
that is established by the director.

See https://bugs.bareos.org/view.php?id=1561 and
https://bugs.bareos.org/view.php?id=1606.
@BareosBot BareosBot force-pushed the fix-catalog-delcandiates-warning branch from 595c2f7 to 800dec0 Compare March 20, 2024 09:46
@BareosBot BareosBot merged commit 5803427 into bareos:master Mar 20, 2024
@smarsching
Copy link
Contributor Author

Yes, this looks good to me.

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.

3 participants