]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply patch from Nic Bellamy for better recycle error messages
authorKern Sibbald <kern@sibbald.com>
Wed, 23 Jul 2003 07:52:44 +0000 (07:52 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 23 Jul 2003 07:52:44 +0000 (07:52 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@646 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/src/dird/catreq.c
bacula/src/version.h

index f3ea4937fa1ac69bcb29c97d64c7e095f7ef6c3d..efb33a7d0ff1ae8c77a957547d03282e41623c7a 100644 (file)
@@ -1,5 +1,7 @@
 
-2003-07-xx Version 1.31 Beta xxJul03
+2003-07-xx Version 1.31 Beta 22Jul03
+- Apply a patch from Nic Bellamy that clarifies the error messages 
+  during recycling volumes.
 - Documentation.
 - Clear VolCatInfo in askdir.c so that readbytes is zeroed.
 - Add SD statistics to backup report.
index dc08a48291cb5ca11b866c9a6cdb27b5c0ec3d5f..b301ef95611bf616a4c367014a41bec0b44c8dc8 100644 (file)
@@ -212,7 +212,6 @@ void catalog_request(JCR *jcr, BSOCK *bs, char *msg)
             } else if (strcmp(mr.VolStatus, "Append") != 0 &&
                        strcmp(mr.VolStatus, "Recycle") != 0) {
                reason = "not Append or Recycle";
-              /* XXX nicb start */
                /* What we're trying to do here is see if the current volume is
                 * "recycleable" - ie. if we prune all expired jobs off it, is
                * it now possible to reuse it for the job that it is currently
@@ -228,8 +227,6 @@ void catalog_request(JCR *jcr, BSOCK *bs, char *msg)
                   */
                  UAContext *ua;
 
-                  reason = "not Append or Recycle (auto recycle failed)";
-
                  ua = new_ua_context(jcr);
                  ok = prune_volume(ua, &mr);
                  free_ua_context(ua);
@@ -240,10 +237,16 @@ void catalog_request(JCR *jcr, BSOCK *bs, char *msg)
                         Jmsg(jcr, M_INFO, 0, "Recycled current "
                               "volume \"%s\"\n", mr.VolumeName);
                        VolSuitable = true;
+                    } else {
+                        reason = "not Append or Recycle (recycling of the "
+                           "current volume failed)";
                     }
+                 } else {
+                     reason = "not Append or Recycle (cannot automatically "
+                        "recycle current volume, as it still contains "
+                        "unpruned data)";
                  }
               }
-              /* XXX nicb end */
            } else if (strcmp(mr.MediaType, jcr->store->media_type) != 0) {
                reason = "not correct MediaType";
            } else if (!jcr->pool->accept_any_volume) {
index b57fa0b50182cdb23a647e51b44ef89c3dad57ac..33f1fd21a35a9c377059cda96bc00225e42aed16 100644 (file)
@@ -10,7 +10,7 @@
 #define SMCHECK     
 #define TRACE_FILE 1  
 
-#define FULL_DEBUG 1    /* normally on for testing only */
+/* #define FULL_DEBUG 1 */   /* normally on for testing only */
 
 /* Turn this on ONLY if you want all Dmsg() to append to the
  *   trace file. Implemented mainly for Win32 ...
@@ -18,7 +18,7 @@
 /*  #define SEND_DMSG_TO_FILE 1 */
 
 /* Turn this on if you want to use the Job semaphore code */
-#define USE_SEMAPHORE
+/* #define USE_SEMAPHORE */
 
 /* Turn this on if you want to use the new Job scheduling code */
 #undef USE_SEMAPHORE