From b63265af51a1eed4d10c9f31c6d83f00c318b17a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 23 Jul 2003 07:52:44 +0000 Subject: [PATCH] Apply patch from Nic Bellamy for better recycle error messages git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@646 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 4 +++- bacula/src/dird/catreq.c | 11 +++++++---- bacula/src/version.h | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index f3ea4937fa..efb33a7d0f 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -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. diff --git a/bacula/src/dird/catreq.c b/bacula/src/dird/catreq.c index dc08a48291..b301ef9561 100644 --- a/bacula/src/dird/catreq.c +++ b/bacula/src/dird/catreq.c @@ -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) { diff --git a/bacula/src/version.h b/bacula/src/version.h index b57fa0b501..33f1fd21a3 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -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 -- 2.39.2