Skip to content

Copy job fails, because "Next Pool" is not accepted as an override in the job config. #2253

@mdc-webdb

Description

@mdc-webdb

Bareos component version

Director: 23.1.3

Steps to reproduce

Try to call an copy job, where the "Next pool" is only set in the job config.

Expected results

That the copy job is executed.

Actual results

Error message:
22-Apr 10:05 Bareos Director JobId 0: Fatal error: No Next Pool specification found in Pool "SourcePool".
But the documentation say's:

A Next Pool override used for Migration/Copy and Virtual Backup Jobs.

Therefore, if you overwrite undefined with defined, the result should be the overwritten value and not an error.
This means that the check as to whether there is a ‘next pool’ can only be carried out after all parameters have been analysed. Presumably the system simply checks whether there is a ‘Next Pool’ in the source pool, regardless of whether it is overwritten or not.

Environment

- OS: RHEL-8/9

Relevant log output

Relevant traces output

Anything else?

Sample config:
Job:

Job {
        Name = "Test copy"
        Type = Copy
         # Jobdef only contain settings for update statistics and messages
        Job Defs = "WebUI"
        Pool = "SourcePool"
        Next Pool = "TargetPool"
        Selection Type = SQLQuery
        Selection Pattern = "select jobid from job where jobid=365279;"
}

Source pool:

Pool {
  Name = "SourcePool"
  Action On Purge = Truncate
  Job Retention = 1w
  File Retention = 1w
  Volume Retention = 1w
  Label Format = "Foo-"
  Maximum Volume Bytes = 1G
  Maximum Volumes = 60
  Storage = "Foo storage"
}

Target pool:

Pool {
  Name = "TargetPool"
  Action On Purge = Truncate
  Job Retention = 1w
  File Retention = 1w
  Volume Retention = 1w
  Label Format = "Bar-"
  Maximum Volume Bytes = 5G 
  Maximum Volumes = 100
  Storage = "Bar storage"
}

Metadata

Metadata

Labels

bugThis addresses a bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions