set environment vars in bpipe fd plugin#2205
Merged
BareosBot merged 15 commits intobareos:masterfrom Sep 3, 2025
Merged
Conversation
a2a8c8d to
978644c
Compare
978644c to
375872c
Compare
fda3e65 to
4dee0ef
Compare
sebsura
requested changes
Jun 23, 2025
systemtests/tests/bpipe-fd/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
Outdated
Show resolved
Hide resolved
2d1a9be to
e5d3a8b
Compare
pstorz
commented
Aug 19, 2025
docs/manuals/source/TasksAndConcepts/Plugins/FileDaemonPlugins/BpipePlugin.rst.inc
Show resolved
Hide resolved
sebsura
requested changes
Aug 19, 2025
Contributor
There was a problem hiding this comment.
This looks very good, but I think we should test two more facts:
- bpipe-fd is supposed to add to the environment, and not replace it
- bpipe-fd is supposed to overwrite the environment on conflict.
This can be easily tested the following way:
create an environment.local file that contains
# these should get overwritten in bpipe-fd
export BareosClientName='-1'
export BareosJobId='-1'
export BareosJobLevel='-1'
export BareosSinceTime='-1'
export BareosJobType='-1'
# this should be preserved inside bpipe-fd
export my_env_variable="still there"
Then we simply need to change the reader/writer program to also output "my_env_variable" and check in the testrunner that it indeed has the right value.
dc45c69 to
f7b06f1
Compare
ea2e1f9 to
ae8adc6
Compare
ae8adc6 to
81f9874
Compare
the following variables are added: - client name ($BareosClientName) - job id ($BareosJobId) - job level ($BareosJobLevel) - since time for differntial/incremental $(BareosSinceTime) - job type ($BareosJobType)
Also add .in to config file extensions.
from writeprogram and instead use "tmp/"
- remove comments from config - fix date in cmake list - added incremental backup run - write to individual files for Full and Inc - do not read backup environment vars from restored data but from immediately written files - verify plausibility of BareosSinceTime - write to std log file names to be able to use check_two_logs()
freebsds date uses different format specifiers.
This was done this way as there is no easy way for a single testrunner to access the environment that the nssm service is created with.
81f9874 to
c8d926e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to the Bareos Project!
This PR sets the environment variables for the joblevel, jobid, job-type client-name and since-time for the bpipe plugin, so that the reader program and the writer program get this information.
Also it adds a systemtests for the bpipe plugin that tests the environment variables.
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)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Required backport PRs have been createdSource code quality
Tests