View Issue Details

IDProjectCategoryView StatusLast Update
0001580bareos-coredirectorpublic2023-12-14 15:38
ReporterPhorms Assigned Tobruno-at-bareos  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionreopened 
PlatformLinuxOSDebianOS Version10
Product Version23.0.0 
Summary0001580: Purge Oldest Volume stops working since update
DescriptionHi,

since updating to version 23 the pool option "Purge Oldest Volume" does not purge the oldest volume anymore.

There is an endless loop of:
bareos-dir JobId 153505: Purging oldest volume "Differential-1577"
bareos-dir JobId 153505: Found 2 Jobs for media "Differential-1577" in catalog "MyCatalog".
bareos-dir JobId 153505: Purge canceled.

Repeated every 5 minutes. See screenshot.

Expected behaviour should delete the 2 Jobs and recycle the volume.
The backup is file based.

Found nothing in the changelog that could explain this behaviour.

https://groups.google.com/g/bareos-users/c/k2fj1sBYJTQ
Steps To ReproduceCreate a pool that is to small to fullfill the retention period time.
Set Purge Oldest Volume = yes
Fill the pool. All Volumes should be "Full".
Use the pool to backup.
TagsNo tags attached.

Activities

Phorms

Phorms

2023-12-12 15:18

reporter  

Bareos2.png (45,746 bytes)   
Bareos2.png (45,746 bytes)   
Phorms

Phorms

2023-12-12 15:20

reporter   ~0005612

This configuration worked for several years without problems.
arogge

arogge

2023-12-12 16:13

manager   ~0005614

From which version did you upgrade? From 22?
bruno-at-bareos

bruno-at-bareos

2023-12-12 17:14

manager   ~0005615

Thanks for the report.

We have been able to reproduce the mis-behavior.
Phorms

Phorms

2023-12-12 17:32

reporter   ~0005617

Upgraded from 22 to 23.

Thanks
arogge

arogge

2023-12-12 17:34

manager   ~0005618

I can already reproduce the issue in a test-case and I even found out why it happens.
Starting with Bareos 23 you will get a confirmation dialog when doing "purge volume=XYZ" and for some strange reason purge oldest volume uses the same code path but, of course, doesn't confirm the operation so it is canceled.
Sorry for that!
arogge

arogge

2023-12-12 18:21

manager   ~0005619

See https://github.com/bareos/bareos/pull/1628
However, that's for the yet-to-be Bareos 24, so it needs to be backported first. It also waits for review and other qa before moving forward.
arogge

arogge

2023-12-12 18:47

manager   ~0005620

Experimental packages are ready: https://download.bareos.org/experimental/PR-1628/
It should be possible to downgrade to Bareos 23 again later when the fix is available in Bareos 23.
arogge

arogge

2023-12-13 13:08

manager   ~0005621

Fix is available in 23.0.0~pre1334.639dd301d
Upgrading to the latest build in current should solve the issue.
Phorms

Phorms

2023-12-13 16:41

reporter   ~0005638

Hi,

thanks for the quick reaction. Sadly it is not fixed.

I installed 23.0.0~pre1334.639dd301d on server & client. Made a pool small enough to test the purging. I will try to add a screenshot after reopening.
Phorms

Phorms

2023-12-13 16:41

reporter   ~0005639

Bareos-Test.PNG (49,550 bytes)   
Bareos-Test.PNG (49,550 bytes)   
bruno-at-bareos

bruno-at-bareos

2023-12-13 16:49

manager   ~0005640

Did you restart the sd and the dir after the upgrade ?
Phorms

Phorms

2023-12-13 17:17

reporter   ~0005641

Yes, every affected server got a restart.
arogge

arogge

2023-12-13 18:55

manager   ~0005642

Could you share your pool-configuration?
As you can see in the pull-request we have a test-case that reproduced your issue and with the patch applied the purging works fine. So maybe there's something else in your pool configuration that we haven't considered?
Phorms

Phorms

2023-12-14 11:32

reporter   ~0005643

Pool {
  Name = Location-Diff
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 180 days
  Maximum Volume Bytes = 10 G
  Maximum Volumes = 120
  Label Format = "Location-Differential-"
  Purge Oldest Volume = yes
}

Hope it helps.
arogge

arogge

2023-12-14 13:15

manager   ~0005645

Hmm. We have pretty much the same configuration for the test (i.e. different names and limits, but essential identical).
Did you start the job manually (i.e. in bconsole with the run command) or was it scheduled? While that should not make a difference, I have no idea why this shouldn't work for you.

Could you also please triple-check that "status dir" reports a recent enough version that contains the fix?
Phorms

Phorms

2023-12-14 15:32

reporter   ~0005646

Sorry, my fault.
I checked the version with "apt show bareos-director", which showed the new version, but that was not the installed version. WebUI and bconsole showed the old verison.

Updating the director fixed the problem.

Thanks for your quick reaction.
bruno-at-bareos

bruno-at-bareos

2023-12-14 15:38

manager   ~0005647

Thanks for the feedback.

Issue History

Date Modified Username Field Change
2023-12-12 15:18 Phorms New Issue
2023-12-12 15:18 Phorms File Added: Bareos2.png
2023-12-12 15:20 Phorms Note Added: 0005612
2023-12-12 16:13 arogge Note Added: 0005614
2023-12-12 17:14 bruno-at-bareos Assigned To => bruno-at-bareos
2023-12-12 17:14 bruno-at-bareos Status new => confirmed
2023-12-12 17:14 bruno-at-bareos Note Added: 0005615
2023-12-12 17:32 Phorms Note Added: 0005617
2023-12-12 17:34 arogge Note Added: 0005618
2023-12-12 18:21 arogge Note Added: 0005619
2023-12-12 18:47 arogge Note Added: 0005620
2023-12-13 13:08 arogge Status confirmed => resolved
2023-12-13 13:08 arogge Resolution open => fixed
2023-12-13 13:08 arogge Note Added: 0005621
2023-12-13 16:41 Phorms Status resolved => new
2023-12-13 16:41 Phorms Resolution fixed => reopened
2023-12-13 16:41 Phorms Note Added: 0005638
2023-12-13 16:41 Phorms Note Added: 0005639
2023-12-13 16:41 Phorms File Added: Bareos-Test.PNG
2023-12-13 16:49 bruno-at-bareos Note Added: 0005640
2023-12-13 17:17 Phorms Note Added: 0005641
2023-12-13 18:55 arogge Note Added: 0005642
2023-12-14 11:32 Phorms Note Added: 0005643
2023-12-14 13:15 arogge Note Added: 0005645
2023-12-14 15:32 Phorms Note Added: 0005646
2023-12-14 15:38 bruno-at-bareos Status new => closed
2023-12-14 15:38 bruno-at-bareos Note Added: 0005647