Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000088bareos-core[All Projects] directorpublic2013-02-25 12:052015-03-25 19:18
Reportermaik 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version12.4.2 
Target Version12.4.3Fixed 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.
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
Attached Files? file icon bareos-dir.conf [^] (10,594 bytes) 2013-03-06 15:56

- Relationships

-  Notes
(0000154)
mvwieringen (developer)
2013-02-25 13:23

Been on the Bacula mailinglist recently.

http://article.gmane.org/gmane.comp.sysutils.backup.bacula.general/73271 [^]
(0000158)
mvwieringen (developer)
2013-02-25 16:08

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.
(0000159)
maik (administrator)
2013-02-25 16:34

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
}
(0000192)
mvwieringen (developer)
2013-02-26 20:08

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.
(0000213)
maik (administrator)
2013-02-28 16:35

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
(0000216)
mvwieringen (developer)
2013-02-28 20:00

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.
(0000217)
maik (administrator)
2013-03-01 08:27

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.
(0000231)
mvwieringen (developer)
2013-03-04 11:14

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.
(0000239)
maik (administrator)
2013-03-06 15:50

first test:
 upgraded job uses right pool (full)
BUT
now all incremental jobs get upgrade to full
(0000240)
maik (administrator)
2013-03-06 15:58

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
(0000244)
maik (administrator)
2013-03-06 16:31

Works now as expected with bareos-director-13.1.0.git.1362582297-18.1.x86_64.rpm
(0000607)
mvwieringen adm (administrator)
2013-08-13 03:12

Fix committed to bareos bareos-12.4 branch with changesetid 974.
(0001387)
mvwieringen (developer)
2015-03-25 16:51

Fix committed to bareos2015 bareos-13.2 branch with changesetid 4297.
(0001542)
joergs (administrator)
2015-03-25 19:18

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
Timestamp: 2013-05-04 11:14:54
Author: 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
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
Timestamp: 2013-05-04 13:14:54
Author: 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
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
Timestamp: 2013-05-04 19:11:18
Author: 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
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
Timestamp: 2013-05-04 21:11:18
Author: 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
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 Note Added: 0000249
2013-03-07 09:36 mvwieringen Status resolved => closed
2013-03-07 09:36 mvwieringen Changeset attached => bareos master f0800951
2013-03-07 09:36 mvwieringen Note Added: 0000250
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-03-07 09:38 mvwieringen Target 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 Note Deleted: 0000249
2013-08-13 09:12 mvwieringen adm Note Deleted: 0000250
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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker