From: Kern Sibbald Date: Mon, 4 Aug 2008 08:49:59 +0000 (+0000) Subject: Add message to migration job when the target job is already migrated. X-Git-Tag: Release-2.4.3~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e28ddab164723c3ee11e320aa9191d9dab2902fe;p=bacula%2Fbacula 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/branches/Branch-2.4@7462 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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 11efb7d532..d36d63b7a6 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -284,6 +284,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 3596458a01..e90bb59fbe 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.4.2" -#define BDATE "26 July 2008" -#define LSMDATE "26Jul08" +#define VERSION "2.4.3" +#define BDATE "08 August 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.4 b/bacula/technotes-2.4 index 6947c76433..e37cd4f5bb 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,10 @@ Technical notes on version 2.4 General: +08Aug08 +kes Add message to migration job when the target job is already migrated. + This closes bug #1129. + Release Version 2.4.2 26Jul08 kes When a migration job actually runs, re-check the Job record