View Issue Details

IDProjectCategoryView StatusLast Update
0000088bareos-coredirectorpublic2015-03-25 19:18
Reportermaik Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version12.4.2 
Fixed in Version12.4.3 
Summary0000088: Upgraded jobs use wrong pool
DescriptionIf an incremental job gets upgraded, because of missing full job, it's data gets written to the pool defined for the incremental job.

Expected behaviour is to have the data written to the pool defined for the full-job.
TagsNo tags attached.

Activities

mvwieringen

mvwieringen

2013-02-25 13:23

developer   ~0000154

Been on the Bacula mailinglist recently.

http://article.gmane.org/gmane.comp.sysutils.backup.bacula.general/73271
mvwieringen

mvwieringen

2013-02-25 16:08

developer   ~0000158

Please attach a log showing the wrong behavior and how you invoke it.

I think I know what is happening but the change needed is something
that needs some testing to see what side effects will happen.
maik

maik

2013-02-25 16:34

administrator   ~0000159

25-Feb 11:23 theseus-dir JobId 8540: Error: Bareos theseus-dir 12.4.1 (06Feb13):
  Build OS: x86_64-unknown-linux-gnu suse openSUSE 11.4 (x86_64)
  JobId: 8540
  Job: moehre.2013-02-25_10.44.29_03
  Backup Level: Full (upgraded from Incremental)
  Client: "moehre-fd" 12.4.1 (06Feb13) Microsoft Windows XP Professional Service Pack 3 (build 2600),Cross-compile,Win32
  FileSet: "cocofileset" 2013-02-25 10:44:29
  Pool: "Incr" (From Job IncPool override)
  Catalog: "MyCatalog" (From Pool resource)
  Storage: "File" (From Job resource)

---
Job {
FileSet = "cocofileset"
Name = "moehre"
Client = moehre-fd
JobDefs = "DefaultJob"
#Schedule = "Manual"
Reschedule On Error = yes
Reschedule Interval = 1h
Reschedule Times = 16
Write Bootstrap = "/var/lib/bacula/moehre.bsr"
}

---
JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = theseus-fd
  FileSet = "server configs"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  MaxFullInterval = 5 weeks
  Differential Backup Pool = Diff
  Incremental Backup Pool = Incr
  Full Backup Pool = Full
  Pool = Default
  Priority = 10
}
mvwieringen

mvwieringen

2013-02-26 20:08

developer   ~0000192

Attached patch does a refactor of some code that should fix the problem
being reported. Needs to be tested however so create a new local branch
on your source tree and apply the patch and perform some tests to see
if the new binary of bareos-dir does the right thing now.
maik

maik

2013-02-28 16:35

administrator   ~0000213

patch does not work:
bareos-dir.service - Bareos Director Daemon service
          Loaded: loaded (/lib/systemd/system/bareos-dir.service; disabled)
          Active: failed (Result: exit-code) since Thu, 28 Feb 2013 16:25:13 +0100; 3min 14s ago
         Process: 2751 ExecStart=/usr/sbin/bareos-dir -c /etc/bareos/bareos-dir.conf (code=exited, status=0/SUCCESS)
        Main PID: 2752 (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/bareos-dir.service

Feb 28 16:25:12 suse122fresh bareos-dir[2752]: BAREOS interrupted by signal 11: Segmentation violation
mvwieringen

mvwieringen

2013-02-28 20:00

developer   ~0000216

And the config works ? e.g. what does a bareos-dir -f -d 100 -t show ?

Compiles and starts for me. As the patch also has nothing todo with
the start sequence I guess your test config is bogus and needs some tuning
before we can get to the next phase testing the actual patch.
maik

maik

2013-03-01 08:27

administrator   ~0000217

No bogus test.

It was our standard CI test, start with default config:

http://jenkins.intern.bareos:8080/view/Alle/job/Bareos%20maik%20suse122fresh/db=mysql/1/console

You can setup a testmachine with the repository and do any debugging as you like.
mvwieringen

mvwieringen

2013-03-04 11:14

developer   ~0000231

Attached a new version of the patch without the code that made it crash
before. I can do normal backups with this one only didn't have a test
set for testing the particular bug reported.

So please test and report back.
maik

maik

2013-03-06 15:50

administrator   ~0000239

first test:
 upgraded job uses right pool (full)
BUT
now all incremental jobs get upgrade to full
maik

maik

2013-03-06 15:56

administrator  

bareos-dir.conf (10,594 bytes)   
#
# Default Bareos Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bareos release 13.1.0 (13 February 2013) -- suse openSUSE 12.2 (x86_64)
#
#  You might also want to change the default email address
#   from root to your address.  See the "mail" and "operator"
#   directives in the Messages resource.
#

Director {                            # define myself
  Name = suse122fresh-dir
  QueryFile = "/usr/lib/bareos/scripts/query.sql"
  Maximum Concurrent Jobs = 1
  Password = "y2O0RWSljRktcwQ3b5985HVjLlk1ruHOAVgrGBMKtRQt"         # Console password
  Messages = Daemon

  # remove comment in next line to load plugins from specified directory
  # Plugin Directory = /usr/lib64/bareos/plugins
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = suse122fresh-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = Default
  Differential Backup Pool = Diff
  Incremental Backup Pool = Incr
  Full Backup Pool = Full
  Priority = 10
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
}

#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /var/lib/bareos/storage
Job {
  Name = "BackupClient1"
  JobDefs = "DefaultJob"
}

#Job {
#  Name = "BackupClient2"
#  Client = suse122fresh2-fd
#  JobDefs = "DefaultJob"
#}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl <catalog-name>
  RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
  # This deletes the copy of the catalog
  RunAfterJob  = "/usr/lib/bareos/scripts/delete_catalog_backup"
  # This sends the bootstrap via mail for disaster recovery.
  # Should be sent to another system, please change recipient accordingly
  Write Bootstrap = "|/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost"
  Priority = 11                   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#  Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
  Name = "RestoreFiles"
  Type = Restore
  Client=suse122fresh-fd
  FileSet="Full Set"
  Storage = File
  Pool = Default
  Messages = Standard
  Where = /tmp/bareos-restores
}


# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
    }
#
#  Put your list of files here, preceded by 'File =', one per line
#    or include an external list with:
#
#    File = <file-name
#
#  Note: / backs up everything on the root partition.
#    if you have other partitions such as /usr or /home
#    you will probably want to add them too.
#
#  By default this is defined to point to the Bareos binary
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
    File = /usr/sbin
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
    File = /var/lib/bareos
    File = /var/lib/bareos/storage
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}

FileSet {
  Name = "Windows All Drives"
  Enable VSS = yes
  Include {
    Options {
      Signature = MD5
      Drive Type = fixed
      IgnoreCase = yes
      WildFile = "[A-Z]:/pagefile.sys"
      WildDir = "[A-Z]:/RECYCLER"
      WildDir = "[A-Z]:/$RECYCLE.BIN"
      WildDir = "[A-Z]:/System Volume Information"
      Exclude = yes
    }
    File = /
  }
}

#
# When to do the backups, full backup on first sunday of the month,
#  differential (i.e. incremental since full) every other sunday,
#  and incremental backups other days
Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sun at 23:05
  Run = Differential 2nd-5th sun at 23:05
  Run = Incremental mon-sat at 23:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 23:10
}

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = "/var/lib/bareos/bareos.sql" # database dump
    File = "/etc/bareos"                # configuration
  }
}

# Client (File Services) to backup
Client {
  Name = suse122fresh-fd
  Address = suse122fresh
  Password = "bjTIHroXQ43CpLe2EtCFqEbvbZPv6M9IxNYyVY8pR+Ph"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = no                      # Prune expired Jobs/Files
}

#
# Second Client (File Services) to backup
#  You should change Name, Address, and Password before using
#
#Client {
#  Name = suse122fresh2-fd
#  Address = suse122fresh2
#  Password = "bjTIHroXQ43CpLe2EtCFqEbvbZPv6M9IxNYyVY8pR+Ph2"         # password for FileDaemon 2
#  File Retention = 30 days            # 30 days
#  Job Retention = 6 months            # six months
#  AutoPrune = no                      # Prune expired Jobs/Files
#}


# Definition of file storage device
Storage {
  Name = File
# Do not use "localhost" here
  Address = suse122fresh                # N.B. Use a fully qualified name here
  Password = "/kM95FO7cvURHqY+oPmATHtUuXwtG3WC1K1bvgCRRRRQ"
  Device = FileStorage
  Media Type = File
}



# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4
#  Do not use "localhost" here
#  Address = suse122fresh                # N.B. Use a fully qualified name here
#  Password = "/kM95FO7cvURHqY+oPmATHtUuXwtG3WC1K1bvgCRRRRQ"          # password for Storage daemon
#  Device = DDS-4                      # must be same as Device in Storage daemon
#  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
#  Autochanger = yes                   # enable for autochanger device
#}

# Definition of 8mm tape storage device
#Storage {
#  Name = "8mmDrive"
#  Do not use "localhost" here
#  Address = suse122fresh                # N.B. Use a fully qualified name here
#  Password = "/kM95FO7cvURHqY+oPmATHtUuXwtG3WC1K1bvgCRRRRQ"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

# Generic catalog service
Catalog {
  Name = MyCatalog
  # Uncomment the following lines if you want the dbi driver
  # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =  
  #dbdriver = "postgresql"
  dbdriver = "mysql"
  dbname = "bareos"
  dbuser = "bareos"
  dbpassword = ""
}

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#  to replace the %r in the from field (-f part) with a single valid
#  email address in both the mailcommand and the operatorcommand.
#  What this does is, it sets the email address that emails would display
#  in the FROM field, which is by default the same email as they're being
#  sent to.  However, if you send email to more than one address, then
#  you'll have to set the FROM address manually, to a single address.
#  for example, a 'no-reply@mydomain.com', is better since that tends to
#  tell (most) people that its coming from an automated source.

#
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
  mail = root@localhost = all, !skipped
  operator = root@localhost = mount
  console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/log/bareos/bareos.log" = all, !skipped
  catalog = all
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
  mail = root@localhost = all, !skipped
  console = all, !skipped, !saved
  append = "/var/log/bareos/bareos.log" = all, !skipped
}

# Default pool definition
#Pool {
#  Name = Default
#  Pool Type = Backup
#  Recycle = yes                       # Bareos can automatically recycle Volumes
#  AutoPrune = yes                     # Prune expired volumes
#  Volume Retention = 365 days         # one year
#}

# File Pool definition
Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes                       # Bareos can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
  Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  Maximum Volumes = 100               # Limit number of Volumes in Pool
}

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 months         # one year
  Label Format = "File-"
  Maximum Volume Bytes = 1 GB
#  Next Pool = Hidrive
}

Pool {
  Name = Incr
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 30 days         # one year
  Label Format = "File-Incremental-"
  Maximum Volume Bytes = 1 GB
}

Pool {
  Name = Diff
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 3 months         # one year
  Label Format = "File-Differential-"
  Maximum Volume Bytes = 1 GB
}

Pool {
  Name = Full
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 12 months         # one year
  Label Format = "File-Full-"
  Maximum Volume Bytes = 10 GB
}

# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = suse122fresh-mon
  Password = "tk5W1j6LK0Rm0h6Rw4Eyzo2alQMx/wQw0X2OYRNWQTif"
  CommandACL = status, .status
}
bareos-dir.conf (10,594 bytes)   
maik

maik

2013-03-06 15:58

administrator   ~0000240

messages showing: full jobs are present but new incr. job gets upgraded:

Terminated Jobs:
 JobId Level Files Bytes Status Finished Name
====================================================================
     1 Full 322 29.90 M OK 06-Mär013 15:34 BackupClient1
     2 322 29.90 M OK 06-Mär013 15:35 RestoreFiles
     3 Full 322 29.90 M OK 06-Mär013 15:47 BackupClient1
     4 Full 322 29.90 M OK 06-Mär013 15:47 BackupClient1
     5 Full 322 29.90 M OK 06-Mär013 15:48 BackupClient1

====
*run
A job name must be specified.
The defined Job resources are:
     1: BackupClient1
     2: BackupCatalog
     3: RestoreFiles
Select Job resource (1-3): 1
Run Backup job
JobName: BackupClient1
Level: Incremental
Client: suse122fresh-fd
Format: Native
FileSet: Full Set
Pool: Incr (From Job IncPool override)
NextPool: *None* (From unknown source)
Storage: File (From Job resource)
When: 2013-03-06 15:50:57
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=6
You have messages.
*mes
06-Mär 15:51 suse122fresh-dir JobId 6: No prior Full backup Job record found.
06-Mär 15:51 suse122fresh-dir JobId 6: No prior or suitable Full backup found in catalog. Doing FULL backup.
06-Mär 15:51 suse122fresh-dir JobId 6: Start Backup JobId 6, Job=BackupClient1.2013-03-06_15.51.04_06
06-Mär 15:51 suse122fresh-dir JobId 6: Using Device "FileStorage" to write.
06-Mär 15:51 suse122fresh-sd JobId 6: Volume "File-Full-0002" previously written, moving to end of data.
06-Mär 15:51 suse122fresh-sd JobId 6: Ready to append to end of Volume "File-Full-0002" size=89917084
06-Mär 15:51 suse122fresh-sd JobId 6: Elapsed time=00:00:01, Transfer rate=29.94 M Bytes/second
06-Mär 15:51 suse122fresh-dir JobId 6: Bareos suse122fresh-dir 13.1.0 (13Feb13):
  Build OS: x86_64-suse-linux-gnu suse openSUSE 12.2 (x86_64)
  JobId: 6
  Job: BackupClient1.2013-03-06_15.51.04_06
  Backup Level: Full (upgraded from Incremental)
  Client: "suse122fresh-fd" 13.1.0 (13Feb13) x86_64-suse-linux-gnu,suse,openSUSE 12.2 (x86_64)
  FileSet: "Full Set" 2013-03-06 15:34:04
  Pool: "Full" (From Job FullPool override)
  Catalog: "MyCatalog" (From Pool resource)
  Storage: "File" (From Job resource)
  Scheduled time: 06-Mär-2013 15:50:57
  Start time: 06-Mär-2013 15:51:06
  End time: 06-Mär-2013 15:51:07
  Elapsed time: 1 sec
  Priority: 10
  FD Files Written: 322
  SD Files Written: 322
  FD Bytes Written: 29,907,464 (29.90 MB)
  SD Bytes Written: 29,940,451 (29.94 MB)
  Rate: 29907.5 KB/s
  Software Compression: None
  VSS: no
  Encryption: no
  Accurate: no
  Volume name(s): File-Full-0002
  Volume Session Id: 6
  Volume Session Time: 1362580437
  Last Volume Bytes: 119,889,375 (119.8 MB)
  Non-fatal FD errors: 0
  SD Errors: 0
  FD termination status: OK
  SD termination status: OK
  Termination: Backup OK
maik

maik

2013-03-06 16:31

administrator   ~0000244

Works now as expected with bareos-director-13.1.0.git.1362582297-18.1.x86_64.rpm
mvwieringen adm

mvwieringen adm

2013-08-13 03:12

administrator   ~0000607

Fix committed to bareos bareos-12.4 branch with changesetid 974.
mvwieringen

mvwieringen

2015-03-25 16:51

developer   ~0001387

Fix committed to bareos2015 bareos-13.2 branch with changesetid 4297.
joergs

joergs

2015-03-25 19:18

developer   ~0001542

Due to the reimport of the Github repository to bugs.bareos.org, the status of some tickets have been changed. These tickets will be closed again.
Sorry for the noise.

Related Changesets

bareos: bareos-12.4 3889f487

2013-05-04 13:14

mvwieringen adm

Ported: N/A

Details Diff
Upgraded jobs use wrong pool

With the introduction of a fix for "#1679 Job Overrides are Not listed
In Manual Run Confirmation" we introduced a bug in an interactive run
as we do an pool override early and ignore any changes later on by
setting a suppress boolean value. This doesn't work when a job gets
upgraded later on to lets say Full because no earlier Full was found
but it started out as an incremental Job.

Moved get_level_since_time() from fd_cmds.c to job.c where it
makes much more sense. Fixed comments and let it return a boolean
which is true when it updated the pool due to a missing
full/differential etc. Now when get_level_since_time() returns true
we force apply_pool_overrides() to ignore any overrides and always
reevaluate the pool it needs to save too (fullpool/diffpool/incpool)

Also moved the call to get_level_since_time() and apply_pool_overrides()
into setup_job() so we don't have to code it twice in
do_native_backup_init() and do_ndmp_backup_init().

get_level_since_time() now always encodes the since value into the
jcr->since variable so we only need one argument to the function
being the jcr and no longer a char pointer and size which for most
calls were pointing to something in the jcr anyway.

Fixes 0000088: Upgraded jobs use wrong pool
Affected Issues
0000088
mod - src/dird/backup.c Diff File
mod - src/dird/fd_cmds.c Diff File
mod - src/dird/job.c Diff File
mod - src/dird/ndmp_dma.c Diff File
mod - src/dird/protos.h Diff File
mod - src/dird/ua_cmds.c Diff File

bareos2015: bareos-12.4 d9db14fc

2013-05-04 15:14

mvwieringen

Ported: N/A

Details Diff
Upgraded jobs use wrong pool

With the introduction of a fix for "#1679 Job Overrides are Not listed
In Manual Run Confirmation" we introduced a bug in an interactive run
as we do an pool override early and ignore any changes later on by
setting a suppress boolean value. This doesn't work when a job gets
upgraded later on to lets say Full because no earlier Full was found
but it started out as an incremental Job.

Moved get_level_since_time() from fd_cmds.c to job.c where it
makes much more sense. Fixed comments and let it return a boolean
which is true when it updated the pool due to a missing
full/differential etc. Now when get_level_since_time() returns true
we force apply_pool_overrides() to ignore any overrides and always
reevaluate the pool it needs to save too (fullpool/diffpool/incpool)

Also moved the call to get_level_since_time() and apply_pool_overrides()
into setup_job() so we don't have to code it twice in
do_native_backup_init() and do_ndmp_backup_init().

get_level_since_time() now always encodes the since value into the
jcr->since variable so we only need one argument to the function
being the jcr and no longer a char pointer and size which for most
calls were pointing to something in the jcr anyway.

Fixes 0000088: Upgraded jobs use wrong pool
Affected Issues
0000088
mod - src/dird/backup.c Diff File
mod - src/dird/fd_cmds.c Diff File
mod - src/dird/job.c Diff File
mod - src/dird/ndmp_dma.c Diff File
mod - src/dird/protos.h Diff File
mod - src/dird/ua_cmds.c Diff File

bareos: master dff7954e

2013-05-04 21:11

mvwieringen adm

Ported: N/A

Details Diff
Upgraded jobs use wrong pool

With the introduction of a fix for "#1679 Job Overrides are Not listed
In Manual Run Confirmation" we introduced a bug in an interactive run
as we do an pool override early and ignore any changes later on by
setting a suppress boolean value. This doesn't work when a job gets
upgraded later on to lets say Full because no earlier Full was found
but it started out as an incremental Job.

Moved get_level_since_time() from fd_cmds.c to job.c where it
makes much more sense. Fixed comments and let it return a boolean
which is true when it updated the pool due to a missing
full/differential etc. Now when get_level_since_time() returns true
we force apply_pool_overrides() to ignore any overrides and always
reevaluate the pool it needs to save too (fullpool/diffpool/incpool)

Also moved the call to get_level_since_time() and apply_pool_overrides()
into setup_job() so we don't have to code it twice in
do_native_backup_init() and do_ndmp_backup_init().

get_level_since_time() now always encodes the since value into the
jcr->since variable so we only need one argument to the function
being the jcr and no longer a char pointer and size which for most
calls were pointing to something in the jcr anyway.

Fixes 0000088: Upgraded jobs use wrong pool
Affected Issues
0000088
mod - src/dird/ua_cmds.c Diff File
mod - src/dird/protos.h Diff File
mod - src/dird/ndmp_dma.c Diff File
mod - src/dird/job.c Diff File
mod - src/dird/fd_cmds.c Diff File
mod - src/dird/backup.c Diff File

bareos2015: bareos-13.2 0e57df75

2013-05-04 23:11

mvwieringen

Ported: N/A

Details Diff
Upgraded jobs use wrong pool

With the introduction of a fix for "#1679 Job Overrides are Not listed
In Manual Run Confirmation" we introduced a bug in an interactive run
as we do an pool override early and ignore any changes later on by
setting a suppress boolean value. This doesn't work when a job gets
upgraded later on to lets say Full because no earlier Full was found
but it started out as an incremental Job.

Moved get_level_since_time() from fd_cmds.c to job.c where it
makes much more sense. Fixed comments and let it return a boolean
which is true when it updated the pool due to a missing
full/differential etc. Now when get_level_since_time() returns true
we force apply_pool_overrides() to ignore any overrides and always
reevaluate the pool it needs to save too (fullpool/diffpool/incpool)

Also moved the call to get_level_since_time() and apply_pool_overrides()
into setup_job() so we don't have to code it twice in
do_native_backup_init() and do_ndmp_backup_init().

get_level_since_time() now always encodes the since value into the
jcr->since variable so we only need one argument to the function
being the jcr and no longer a char pointer and size which for most
calls were pointing to something in the jcr anyway.

Fixes 0000088: Upgraded jobs use wrong pool
Affected Issues
0000088
mod - src/dird/backup.c Diff File
mod - src/dird/fd_cmds.c Diff File
mod - src/dird/job.c Diff File
mod - src/dird/ndmp_dma.c Diff File
mod - src/dird/protos.h Diff File
mod - src/dird/ua_cmds.c Diff File

Issue History

Date Modified Username Field Change
2013-02-25 12:05 maik New Issue
2013-02-25 13:23 mvwieringen Note Added: 0000154
2013-02-25 16:08 mvwieringen Note Added: 0000158
2013-02-25 16:08 mvwieringen Assigned To => mvwieringen
2013-02-25 16:08 mvwieringen Status new => feedback
2013-02-25 16:34 maik Note Added: 0000159
2013-02-25 16:34 maik Status feedback => assigned
2013-02-26 20:06 mvwieringen File Added: 0001-First-try-a-fixing-Upgraded-jobs-use-wrong-pool.patch
2013-02-26 20:08 mvwieringen Note Added: 0000192
2013-02-26 20:08 mvwieringen Assigned To mvwieringen =>
2013-02-26 20:08 mvwieringen Status assigned => feedback
2013-02-28 16:35 maik Note Added: 0000213
2013-02-28 16:35 maik Status feedback => new
2013-02-28 17:20 mvwieringen File Deleted: 0001-First-try-a-fixing-Upgraded-jobs-use-wrong-pool.patch
2013-02-28 20:00 mvwieringen Note Added: 0000216
2013-02-28 20:00 mvwieringen Assigned To => mvwieringen
2013-02-28 20:00 mvwieringen Status new => feedback
2013-03-01 08:27 maik Note Added: 0000217
2013-03-01 08:27 maik Status feedback => assigned
2013-03-04 11:11 mvwieringen File Added: 0001-First-try-a-fixing-Upgraded-jobs-use-wrong-pool.patch
2013-03-04 11:14 mvwieringen Note Added: 0000231
2013-03-04 11:14 mvwieringen Status assigned => feedback
2013-03-06 15:50 maik Note Added: 0000239
2013-03-06 15:50 maik Status feedback => assigned
2013-03-06 15:56 maik File Added: bareos-dir.conf
2013-03-06 15:58 maik Note Added: 0000240
2013-03-06 16:31 maik Note Added: 0000244
2013-03-06 16:31 maik Status assigned => resolved
2013-03-06 16:31 maik Resolution open => fixed
2013-03-07 09:36 mvwieringen Changeset attached => bareos Branch-12.4 f431725e
2013-03-07 09:36 mvwieringen Status resolved => closed
2013-03-07 09:36 mvwieringen Changeset attached => bareos master f0800951
2013-03-07 09:38 mvwieringen File Deleted: 0001-First-try-a-fixing-Upgraded-jobs-use-wrong-pool.patch
2013-03-07 09:38 mvwieringen Assigned To mvwieringen =>
2013-03-07 09:38 mvwieringen Product Version => 12.4.2
2013-03-07 09:38 mvwieringen Fixed in Version => 12.4.3
2013-08-13 03:12 mvwieringen adm Changeset attached => bareos master dff7954e
2013-08-13 03:12 mvwieringen adm Changeset attached => bareos bareos-12.4 3889f487
2013-08-13 03:12 mvwieringen adm Note Added: 0000607
2013-08-13 03:12 mvwieringen adm Assigned To => mvwieringen adm
2013-08-13 03:12 mvwieringen adm Status closed => resolved
2013-08-13 09:12 mvwieringen adm Assigned To mvwieringen adm =>
2013-08-13 09:12 mvwieringen adm Status resolved => closed
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-12.4 d9db14fc
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-13.2 0e57df75
2015-03-25 16:51 mvwieringen Note Added: 0001387
2015-03-25 16:51 mvwieringen Status closed => resolved
2015-03-25 19:18 joergs Note Added: 0001542
2015-03-25 19:18 joergs Status resolved => closed