From 1ff1d36f1cc2df9d09a506ab138cf75507519969 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 18 Nov 2006 10:57:21 +0000 Subject: [PATCH] 18Nov06 kes Add a SMALLOC_SANITY_CHECK for Arno, which aborts Bacula if memory usage gets too big. kes Tweak migration to ensure that read/write devices are different. 17Nov06 kes Create an AUTHORS file to list Bacula contributors. kes Add Richard Stallman's four GPL freedoms to LICENSE kes Require the conf file to have a valid NextPool for writing the migration output. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3645 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/AUTHORS | 70 +++++++++++++++++++++++++++++++++++++++ bacula/LICENSE | 14 ++++++++ bacula/projects | 33 ++++++++++++++++++ bacula/src/dird/migrate.c | 20 +++++++++-- bacula/src/lib/smartall.c | 5 +++ bacula/src/version.h | 11 ++++-- bacula/technotes-1.39 | 9 +++++ 7 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 bacula/AUTHORS diff --git a/bacula/AUTHORS b/bacula/AUTHORS new file mode 100644 index 0000000000..30e592b8f8 --- /dev/null +++ b/bacula/AUTHORS @@ -0,0 +1,70 @@ + +This file contains a list of the people who have contributed code, programs or +documentation to the Bacula project. Thanks to all of you. Without your +participation, Bacula would not be the success it is today. + +If you have made a contribution and do not find your +name on this list, please send a note to me: kern@sibbald.com + +(Note, under construction prior to version 1.40 release) + +Contributors: + +Adrew J. Millar +Adrian Close +Aleksandar Milivojevic +Alexander Bergolth +Alexandre Baron +Andrew Ford +Arno Lehmann +Bernd Frick +Carlos A. Molina G +Carsten Paeth +Chris Lee +Christian Masopust +Christopher Hull +Dan Langille +David Boyes +David Duchscher +D. Scott Barninger +Eamon Brosnan +Eric Bollengier +Erich Prinz +Felix Schwarz +Francisco Reyes +Frank Sweetser +Howard Thomson +Jaime Ventura +Jan Kesten +John Goerzen +John Kodis +Jose Luis Tallon +Jo Simoens +Juan Luis Frances +Juergen Lock +Karl Cunningham +Kern Sibbald +Landon Fuller +Luca Berra +Lucas Di Pentima +Ludovic Strappazon +Marc Cousin +Martin Simmons +Meno Abels +Michael -buk- Scherer +Michel Meyers +Morgan +Nic Bellamy +Nicolas Boichat +Peter Eriksson +Philippe Chauvat +Phil Stracchino +Preben Guldberg +Richard Mortimer +Robert Nelson +Rudolf Cejka +Russel Howe +Thorsten Enge +Tim Oberfoell +Tomas Cameron +Wolfgang Denk diff --git a/bacula/LICENSE b/bacula/LICENSE index ee5e5656b8..cb3b4d3965 100644 --- a/bacula/LICENSE +++ b/bacula/LICENSE @@ -78,6 +78,20 @@ as well as at www.bacula.org. You may also obtain a copy of the GPL (or LGPL) by writing to: Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +The Four Freedoms Guaranteed by the GPL: +Freedom zero is the freedom to run the program as you wish for any purpose. + +Freedom one is the freedom to study the source code and change it +to do what you wish. + +Freedom two is the freedom to help your neighbour, that's the +freedom to make copies and distribute them to others when you +wish. + +Freedom three is the freedom to help your community, that's the +freedom to publish or distribute modified versions when you wish. + +Other Licenses: Certain parts of the Bacula software are licensed by their copyright holder(s) under the GPL with no modifications. These software files are clearly marked as such. diff --git a/bacula/projects b/bacula/projects index 3da15a6a32..0cd172413d 100644 --- a/bacula/projects +++ b/bacula/projects @@ -1153,3 +1153,36 @@ Item n: Allow inclusion/exclusion of files in a fileset by creation/mod times "[Created] [Modified] [Before|Since] = ". So one could compare against 'ctime' and/or 'mtime', but ONLY 'before' or 'since'. + + +Item 1: Bacula support for a MailOnSuccess feature. + Origin: Jaime Ventura + Date: 15 November 2006 + Status: for 1.38.11: coded(patch on attachment), compiled, tested + for 1.39.28: coded(patch on attachment), complied, NOT tested + + + What: be able to send a email message for a specified email address if (and only if) a job finishes successfully. + Its similar to the MailOnError feature. + + Why: The importance is about the same as MailOnError feature. + Since its not possible to do it using bacula's message types(info, error,...)filter, this could be done using some kind of filter, right after the mail was sent. + But since there is a MailOnError feature, why not have a MailOnSuccess feature? + + +Notes: + + Why its not possible to do it using bacula's message types(info, error,...)? + + Imagine I want bacula to send ONLY successful job reports/messages to baculaOK@domain. + When a job starts, bacula send the message : 10-Nov 17:37 bserver-dir: Start Backup JobId 1605, Job=Job.GSI04.2006-11-10_17.37.30 + Since this is a info message (msgtype = M_INFO) the "bacula's messaging system" put it on the job messages (jcr->jcr_msgs) to be sent + to all dest that have the info type enabled (including baculaOK@domain). + But when/if the job fails, that message (10-Nov 17:37 bserver-dir: Start Backup JobId 1605, Job=Job.GSI04.2006-11-10_17.37.30) has already + been queued to be sent to baculaOK@domain, even though it refers to a unsuccessful backup. + So when its time to send all messages to emails, the "bacula's messaging system" send that message (10-Nov 17:37 bserver-dir: Start + Backup JobId 1605, Job=Job.GSI04.2006-11-10_17.37.30) to baculaOK@domain, but using the subject "bacula ERROR", because the job terminated unsuccessful. + + This "problem" could also happen if I wanted bacula to send emails regarding unsuccessful backups, if i didnt use the MailOnError feature. + This feature is implemented so that if messages that where queued to be sent if the backup was unsuccessful, to be discarded if the backup is + diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index d92b4750e0..1f6e13fd0e 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -77,10 +77,10 @@ bool do_migration_init(JCR *jcr) return false; } - /* If pool storage specified, use it instead of job storage */ + /* If pool storage specified, use it instead of job storage */ copy_wstorage(jcr, jcr->pool->storage, _("Pool resource")); - if (!jcr->wstorage) { + if (jcr->wstorage->size() == 0) { Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Job or Pool.\n")); return false; } @@ -205,10 +205,20 @@ bool do_migration(JCR *jcr) mig_jcr->pool = jcr->pool = pool->NextPool; mig_jcr->jr.PoolId = jcr->jr.PoolId; pm_strcpy(jcr->pool_source, _("NextPool in Pool resource")); + } else { + Jmsg(jcr, M_FATAL, 0, _("No Next Pool specification found in Pool \"%s\".\n"), + pool->hdr.name); + return false; + } + + if (!jcr->pool->storage) { + Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Next Pool \"%s\".\n"), + jcr->pool->hdr.name); + return false; } /* If pool storage specified, use it instead of job storage for backup */ - copy_wstorage(jcr, jcr->pool->storage, _("Pool resource")); + copy_wstorage(jcr, jcr->pool->storage, _("Next pool resource")); /* Print Job Start message */ Jmsg(jcr, M_INFO, 0, _("Start Migration JobId %s, Job=%s\n"), @@ -257,6 +267,10 @@ bool do_migration(JCR *jcr) Dmsg2(dbglevel, "Read store=%s, write store=%s\n", ((STORE *)jcr->rstorage->first())->name(), ((STORE *)jcr->wstorage->first())->name()); + if (((STORE *)jcr->rstorage->first())->name() == ((STORE *)jcr->wstorage->first())->name()) { + Jmsg(jcr, M_FATAL, 0, _("Read storage \"%s\" same as write storage.\n"), + ((STORE *)jcr->rstorage->first())->name()); + } if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { return false; } diff --git a/bacula/src/lib/smartall.c b/bacula/src/lib/smartall.c index 5ad10e539a..6261fffc6c 100644 --- a/bacula/src/lib/smartall.c +++ b/bacula/src/lib/smartall.c @@ -132,6 +132,11 @@ static void *smalloc(const char *fname, int lineno, unsigned int nbytes) Emsg0(M_ABORT, 0, _("Out of memory\n")); } Dmsg4(1150, "smalloc %d at %x from %s:%d\n", nbytes, buf, fname, lineno); +#if SMALLOC_SANITY_CHECK > 0 + if (sm_bytes > SMALLOC_SANITY_CHECK) { + Emsg0(M_ABORT, 0, _("Too much memory used.")); + } +#endif return (void *)buf; } diff --git a/bacula/src/version.h b/bacula/src/version.h index 3c83e5f9a6..16fe1db98d 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.29" -#define BDATE "14 November 2006" -#define LSMDATE "14Nov06" +#define BDATE "18 November 2006" +#define LSMDATE "18Nov06" #define BYEAR "2006" /* year for copyright messages in progs */ /* Debug flags */ @@ -28,6 +28,13 @@ /* #define TRACE_RES 1 */ /* #define DEBUG_MEMSET 1 */ /* #define DEBUG_MUTEX 1 */ +/* + * Set SMALLOC_SANITY_CHECK to zero to turn off, otherwise + * it is the maximum memory malloced before Bacula will + * abort. Except for debug situations, this should be zero + */ +#define SMALLOC_SANITY_CHECK 0 /* 500000000 0.5 GB max */ + /* Check if header of tape block is zero before writing */ /* #define DEBUG_BLOCK_ZEROING 1 */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 38cb4a9b0e..8469fddff3 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,15 @@ Technical notes on version 1.39 General: +18Nov06 +kes Add a SMALLOC_SANITY_CHECK for Arno, which aborts Bacula + if memory usage gets too big. +kes Tweak migration to ensure that read/write devices are different. +17Nov06 +kes Create an AUTHORS file to list Bacula contributors. +kes Add Richard Stallman's four GPL freedoms to LICENSE +kes Require the conf file to have a valid NextPool for writing the + migration output. 16Nov06 ebl Enable RecycleCount in catalog. ebl Fix "echo python | bconsole" segfault -- 2.39.5