View Issue Details

IDProjectCategoryView StatusLast Update
0000824bareos-coredirectorpublic2023-07-20 09:43
Reportermedicmomcilo Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSanyOS Version3
Product Version16.2.4 
Summary0000824: Consolidation job requires explicit Storage definiton in Pool resource
DescriptionDocumentation states that defining Storage is not required in either Pool or Job resource, but that it must exist in at least one.

However, I ran into the issue where Virtual Full job requires Storage to be defined in Pool resource even though it was already present at Job resource.

Error message presented was:
Fatal error: No Storage specification found in Next Pool "poolname".

Manually copying storage from Job to Pool resource removed the error and backup job completed successfully. This is bad workaround as this removes flexibility that we previously exploited in having Storage defined at Job level rather than Pool level.

Detected storage line in job log looks like this.
*When defined in Job resource:
  "Storage: "storagename" (From Job resource)"
*When defined in Pool resource:
  "Storage: "storagename" (From Storage from Pool's NextPool resource)"

If any more information is required, please do let me know.

Kind regards,
Momcilo 'Momo' Medic.
(fedorauser)
Steps To Reproduce*Create pool without Storage definition.
*Create Always Incremental job with Storage defined.
*Wait for first Consolidation job.
*Error is thrown.
TagsNo tags attached.

Activities

medicmomcilo

medicmomcilo

2017-06-08 15:21

reporter  

0001-Fixes-bug-0000824-Consolidation-pool-requires-storag.patch (1,061 bytes)   
From d53217d08d68a3c66d621298a880d22db5e73c3a Mon Sep 17 00:00:00 2001
From: Momcilo Medic <medicmomcilo@gmail.com>
Date: Thu, 8 Jun 2017 15:11:57 +0200
Subject: [PATCH] Fixes bug 0000824 - 'Consolidation pool requires storage'

---
 src/dird/migrate.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/dird/migrate.c b/src/dird/migrate.c
index 617b9f3b..da04622b 100644
--- a/src/dird/migrate.c
+++ b/src/dird/migrate.c
@@ -236,9 +236,12 @@ bool set_migration_wstorage(JCR *jcr, POOLRES *pool, POOLRES *next_pool, const c
    }
 
    if (!next_pool->storage || next_pool->storage->size() == 0) {
-      Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Next Pool \"%s\".\n"),
-           next_pool->name());
-      return false;
+      if (!jcr->res.wstorage) {
+         Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Job or Next Pool \"%s\".\n"),
+              next_pool->name());
+         return false;
+      }
+      return true;
    }
 
    copy_wstorage(jcr, next_pool->storage, where);
-- 
2.13.0

medicmomcilo

medicmomcilo

2017-06-08 15:21

reporter   ~0002651

This one seems relatively easy to fix.
We need to allow for backup to take place if we already have write storage defined.
I am attaching proposed patch that would make job only fail if wstorage is not defined in Job resource and we don't have storage in pool.

Patch is rather small and should be easy to review.

Please let me know if any more information is needed from me.

Kind regards,
Momo.
Mc.Sim

Mc.Sim

2021-06-26 20:00

reporter   ~0004160

Last edited: 2021-06-26 20:00

We have the exactly the same problem on `Version: 20.0.1 (02 March 2021) Ubuntu 20.04.1 LTS`

```
[root@i-bareos:/data/bareos/config]# cat ./director/bareos-dir.d/pool/AI-Consolidated.conf
Pool {
  Name = AI-Consolidated
  PoolType = Backup
  Recycle = yes
  AutoPrune = yes
  VolumeRetention = 360 days
  MaximumVolumeBytes = 100G
  LabelFormat = AI-Consolidated-
  VolumeUseDuration = 23h
}
[root@i-bareos:/data/bareos/config]# cat ./director/bareos-dir.d/pool/AI-Incremental.conf
Pool {
  Name = AI-Incremental
  PoolType = Backup
  Recycle = yes
  AutoPrune = yes
  VolumeRetention = 360 days
  MaximumVolumeBytes = 100G
  MaximumVolumeJobs = 1
  LabelFormat = AI-Incremental-
  VolumeUseDuration = 23h
  NextPool = AI-Consolidated
}
[root@i-bareos:/data/bareos/config]#
```

bruno-at-bareos

bruno-at-bareos

2023-07-20 09:43

manager   ~0005233

Documentation explain now and show example of pools with storage definition

Issue History

Date Modified Username Field Change
2017-05-30 15:53 medicmomcilo New Issue
2017-06-06 15:41 joergs Status new => acknowledged
2017-06-08 15:21 medicmomcilo File Added: 0001-Fixes-bug-0000824-Consolidation-pool-requires-storag.patch
2017-06-08 15:21 medicmomcilo Note Added: 0002651
2021-06-26 20:00 Mc.Sim Note Added: 0004160
2021-06-26 20:00 Mc.Sim Note Edited: 0004160
2023-07-20 09:43 bruno-at-bareos Assigned To => bruno-at-bareos
2023-07-20 09:43 bruno-at-bareos Status acknowledged => closed
2023-07-20 09:43 bruno-at-bareos Resolution open => fixed
2023-07-20 09:43 bruno-at-bareos Note Added: 0005233