Fix output of show command for RunsOnClient#1217
Conversation
|
Hello Joerg, I've made some additional tests and I would like to clear out the unclear state of where the job will be run in the following scenario. If defined like With this PR It will output the following Which is what we decide is correct. Now if we don't specify Where it run like It shows Which let undetermined if yes or no it will run on client, the operator can check the documentation and will find that by default The resulting show form look like: Here we can eventually deduce that console will never be run on client. |
I even expect, that |
|
My concern is that for the moment any console or command if the RunOnClient = No is not specified are run on client and show verbose doesn't confirm that. so yes we need to fix this. and maybe also fixing console to never be run on client (or there's a use case, that I'm not aware of?) log use |
30caf30 to
5f13099
Compare
|
@bruno-at-bareos I updated the PR to cover the problems you described. |
bruno-at-bareos
left a comment
There was a problem hiding this comment.
Nice approach, I believe we cover all the case. There's just minor modification to still be included.
.../python-bareos/etc/bareos/bareos-dir.d/job/backup-bareos-fd-runscript-console-client.conf.in
Outdated
Show resolved
Hide resolved
|
Now, it warns only once the misconfigured Runscript resource. |
|
In my last manual testing I found that we emit a warning about console command without a RunOnClient=No. There are configuration warnings:
I'm asking for that because if operator now use the show command the RunOnClient = no is automatically added. What's your opinion on this ? |
|
I intentionally added the warning, as the behavior is somehow changed now. but as Bareos then tries to execute "prune stats yes" on the client as a shell script (this might work for some commands, that also exists in the OS or if you create And this is still true, just that specifying a Console runscript implicietly sets |
Runscript resources can contain OS commands (Command=) or Bareos console commands (Console=). Console runscript can only be executed on the Director, therefore the RunOnClient directive is ignored for them.
fee2131 to
0173e48
Compare
RunOnClient is only used for external commands, not console commands. Console commands are always executed on the Director. Also some cleanup in the RunScript section.
0173e48 to
312312a
Compare
This change fixes the output of the show command for RunsOnClient.
Also implement show verbose for Runscripts
and execute Console Runscripts always on the Director, not the client.
OP#5211
Thank you for contributing to the Bareos Project!
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
[ ] If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2xSource code quality
bareos-check-sources --since-mergedoes not report any problemsgit statusshould not report modifications in the source tree after building and testingTests