bareos
bareos copied to clipboard
NextPool in Job Resource does not work
Bareos component version
23.0.3~pre121.285f8d75b
Steps to reproduce
I have a Job that is overwriting the NextPool from the Pool resource. But if the job is run from bconsole the NextPool from the Pool is used. If I overwrite the NextPool in the run command, it is working as expected:
Job {
Name = Offsite1
JobDefs = Defaults
Type = Copy
Level = Full
Pool = Longterm
Next Pool = Offsite1
}
Pool {
Name = Longterm
Pool Type = Backup
Storage = Longterm
NextPool = Tape-Longterm
[...]
}
*run job=Offsite1
Automatically selected Catalog: Catalog
Using Catalog "Catalog"
Run Copy job
JobName: Offsite1
Bootstrap: *None*
Read Storage: Longterm (From Pool resource)
Pool: Longterm (From Job resource)
Write Storage: LTO-3 (From Storage from Run NextPool override)
NextPool: Tape-Longterm (From unknown source)
JobId: *None*
When: 2024-05-27 13:51:08
Catalog: Catalog
*run job=Offsite1 nextpool=Offsite1
Run Copy job
JobName: Offsite1
Bootstrap: *None*
Read Storage: Longterm (From Pool resource)
Pool: Longterm (From Job resource)
Write Storage: Offsite1 (From Storage from Run NextPool override)
NextPool: Offsite1 (From command line)
JobId: *None*
When: 2024-05-27 13:51:47
Catalog: Catalog
I suspect that the error is here: https://github.com/bareos/bareos/blob/master/core/src/dird/ua_run.cc#L845 because it is only checking if the next pool is different from the value of the pool.
Expected results
NextPool from the job should be used.
Actual results
NextPool from the job is ignored.
Environment
No response
Relevant log output
No response
Relevant traces output
No response
Anything else?
No response