From b54fcebb4ff6e86b31b4bceadd904e4ff31a0c2a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 4 Aug 2008 08:52:09 +0000 Subject: [PATCH] Add message to migration job when the target job is already migrated. This closes bug #1129. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7463 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 17 +++++++++++++++ bacula/patches/2.4.2-mig-message.patch | 29 ++++++++++++++++++++++++++ bacula/src/dird/migrate.c | 2 ++ bacula/src/version.h | 6 +++--- bacula/technotes-2.5 | 3 +++ 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 bacula/patches/2.4.2-mig-message.patch diff --git a/bacula/kernstodo b/bacula/kernstodo index 530d143294..d9ff415053 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -114,6 +114,23 @@ Professional Needs: Priority: ================ +- Can be posible modify package to create and use configuration files in + the Debian manner? + + For example: + + /etc/bacula/bacula-dir.conf + /etc/bacula/conf.d/pools.conf + /etc/bacula/conf.d/clients.conf + /etc/bacula/conf.d/storages.conf + + and into bacula-dir.conf file include + + @/etc/bacula/conf.d/pools.conf + @/etc/bacula/conf.d/clients.conf + @/etc/bacula/conf.d/storages.conf +- Possibly add an Inconsistent state when a Volume is in error + for non I/O reasons. - Fix #ifdefing so that smartalloc can be disabled. Check manual -- the default is enabled. - Change calling sequence to delete_job_id_range() in ua_cmds.c diff --git a/bacula/patches/2.4.2-mig-message.patch b/bacula/patches/2.4.2-mig-message.patch new file mode 100644 index 0000000000..a9d2f67fcb --- /dev/null +++ b/bacula/patches/2.4.2-mig-message.patch @@ -0,0 +1,29 @@ + + This patch causes a message to be printed if the migration job finds that + the target job has already been migrated: + + JobId %s already migrated probably by another Job. Migration stopped. + + It can be applied to 2.4.2 (not to previous versions) with: + + cd + patch -p0 <2.4.2-mig-message.patch + ./configure + make + ... + make install + + +Index: src/dird/migrate.c +=================================================================== +--- src/dird/migrate.c (revision 7444) ++++ src/dird/migrate.c (working copy) +@@ -284,6 +284,8 @@ + } + /* Make sure this job was not already migrated */ + if (jcr->previous_jr.JobType != JT_BACKUP) { ++ Jmsg(jcr, M_INFO, 0, _("JobId %s already migrated probably by another Job. Migration stopped.\n"), ++ edit_int64(jcr->previous_jr.JobId, ed1)); + set_jcr_job_status(jcr, JS_Terminated); + migration_cleanup(jcr, jcr->JobStatus); + return true; diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index 07d90fe75d..edc24b1f56 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -286,6 +286,8 @@ bool do_migration(JCR *jcr) } /* Make sure this job was not already migrated */ if (jcr->previous_jr.JobType != JT_BACKUP) { + Jmsg(jcr, M_INFO, 0, _("JobId %s already migrated probably by another Job. Migration stopped.\n"), + edit_int64(jcr->previous_jr.JobId, ed1)); set_jcr_job_status(jcr, JS_Terminated); migration_cleanup(jcr, jcr->JobStatus); return true; diff --git a/bacula/src/version.h b/bacula/src/version.h index 95f056365b..e65f12ae87 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.5.2" -#define BDATE "30 July 2008" -#define LSMDATE "30Jul08" +#define VERSION "2.5.3" +#define BDATE "08 Aug 2008" +#define LSMDATE "08Aug08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 05aa12047e..6c355d22e5 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -32,6 +32,9 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: +08Aug08 +kes Add message to migration job when the target job is already migrated. + This closes bug #1129. 30Jul08 kes Fix Win32 build. kes Raise some restore debug levels. -- 2.39.5