View Issue Details

IDProjectCategoryView StatusLast Update
0000876bareos-coreGeneralpublic2017-12-27 12:05
Reporterjason.agilitypr Assigned To 
PrioritylowSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSUbuntuOS Version12.04
Product Version16.2.4 
Summary0000876: modify the bareos-dir -t command to validate a single conf
DescriptionI use puppet to automate configuration changes to bareos.
to prevent puppet from deploying a bad configuration file change, i would like to take advantage of the puppet validate_cmd parameter.
to use this parameter i need a command that can be run, that takes a filename as input and return whether or not there are syntax errors in the file.
ex : bareos-dir -t bitbucket-backup.conf
almost works as is, but it errors out while trying to resolve all the references.
perhaps an extra parameter could be provide that tells bareos to ignore reference resolution and only do syntax checking.
obviously this would not be a complete configuration validation without the reference validation, but will would provide some degree of bad config deployment.

TagsNo tags attached.

Activities

joergs

joergs

2017-11-27 16:25

developer   ~0002822

I understand your request. However, I know the code and don't see this happening soon.

If see following alternatives:
  * use the "configure add" command (obviously only für adding a resource)
  * copy the new config file in place and test the full configuration (bareos-dir -t). If it fails, remove your change again.
  * As the second approach may cause problems with simultaneous changes: copy the existing configuration into a private tmp directory (mktemp), apply your change and check this (bareos -t -c $YOUR_TMP_CONFIG).
 
joergs

joergs

2017-12-27 12:05

developer   ~0002844

No further feedback received. Closing this issue after 1 month.

Issue History

Date Modified Username Field Change
2017-11-24 17:23 jason.agilitypr New Issue
2017-11-27 16:25 joergs Note Added: 0002822
2017-11-27 16:25 joergs Assigned To => joergs
2017-11-27 16:25 joergs Status new => feedback
2017-12-27 12:05 joergs Note Added: 0002844
2017-12-27 12:05 joergs Status feedback => closed
2017-12-27 12:05 joergs Assigned To joergs =>
2017-12-27 12:05 joergs Resolution open => no change required