dird: fix director resource not showing when using show director or the --xc director cli option#1315
Conversation
4ab25ec to
8b10aea
Compare
8b10aea to
ef1c73b
Compare
joergsteffens
left a comment
There was a problem hiding this comment.
Testing shows, that the bconsole show command works as expected.
However, there are (now?) discrepancies between the bconsole show command and the --export-config command line argument:
bconsole:
*show DONTEXIST
Resource DONTEXIST not found
*show job=DONTEXIST
job resource DONTEXIST not found.
Okay.
cmdline:
sbin/bareos_dir-python-bareos -c etc/bareos --xc job DONTEXIST
No ***UNKNOWN*** resource defined
$ sbin/bareos_dir-python-bareos -c etc/bareos --xc director
<no outputp>
$ sbin/bareos_dir-python-bareos -c etc/bareos --xc DONTEXIST
<no outputp>
--xc director doesn't work. Missing error output.
Other differences:
- bconsole:
- show job => show jobdefs
- show jobs => show jobs
- cmd:
--xc job => show jobs--xc jobs => <empty>
The job and jobs keywords are handled differently.
core/src/dird/ua_output.cc
Outdated
| switch (type) { | ||
| case -1: /* all */ | ||
| ShowAll(ua, hide_sensitive_data, verbose); | ||
| case -1: |
There was a problem hiding this comment.
Can you define these magic numbers somewhere?
|
Please also run |
as it clashes with `verbose` from messages.h
ef1c73b to
b3b2750
Compare
|
The differences between show and export config were already there on master, so the changes here did not add anything new to that. The issue with is the same thing in relation to the enum changes, but not directly involved with the show command. I pushed a fix for that too. The show command and the export config option do not use exactly the same code. In case we want them to behave the same, I can implement changes for that. Otherwise, if we want to keep this PR uniquely for the purpose of fixing the director config not showing up, we can do the unification of behavior in another PR. |
show directors not working as expectedshow director or the --xc director cli option
2438514 to
bb3ce33
Compare
Thank you for contributing to the Bareos Project!
Description
show directorscommand does not work as expected due to a previous update to enums.This PR fixes the issue.
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-mergedoes not report any problemsTests