View Issue Details

IDProjectCategoryView StatusLast Update
0000876bareos-core[All Projects] Generalpublic2017-12-27 12:05
Reporterjason.agilityprAssigned To 
Status closedResolutionno change required 
PlatformLinuxOSUbuntuOS Version12.04
Product Version16.2.4 
Target VersionFixed in Version 
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.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action




2017-11-27 16:25

administrator   ~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).


2017-12-27 12:05

administrator   ~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