View Issue Details

IDProjectCategoryView StatusLast Update
0000824bareos-core[All Projects] directorpublic2017-06-08 15:21
ReportermedicmomciloAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
PlatformLinuxOSanyOS Version3
Product Version16.2.4 
Fixed in Version 
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.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: 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

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.

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