From 43b28d49e576994efc9e7fd1748d01357fd3bf83 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 27 Apr 2009 15:43:34 +0000 Subject: [PATCH] ebl Fix bug #1274 where a migration job can be canceled like the original job by the MaxRunTime directive. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8754 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/job.c | 2 +- bacula/src/dird/migrate.c | 3 +++ bacula/src/jcr.h | 1 + bacula/technotes | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 252a89a865..08a99127dc 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -506,7 +506,7 @@ static void job_monitor_watchdog(watchdog_t *self) foreach_jcr(jcr) { bool cancel = false; - if (jcr->JobId == 0 || job_canceled(jcr)) { + if (jcr->JobId == 0 || job_canceled(jcr) || jcr->no_maxtime) { Dmsg2(800, "Skipping JCR=%p Job=%s\n", jcr, jcr->Job); continue; } diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index 4521cf02aa..afb8606200 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -208,6 +208,9 @@ bool do_migration_init(JCR *jcr) mig_jcr->jr.PoolId = jcr->jr.PoolId; mig_jcr->jr.JobId = mig_jcr->JobId; + /* Don't let WatchDog checks Max*Time value on this Job */ + mig_jcr->no_maxtime = true; + Dmsg4(dbglevel, "mig_jcr: Name=%s JobId=%d Type=%c Level=%c\n", mig_jcr->jr.Name, (int)mig_jcr->jr.JobId, mig_jcr->jr.JobType, mig_jcr->jr.JobLevel); diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index dac2a7b4ee..f227bbf519 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -326,6 +326,7 @@ public: bool VSS; /* VSS used by FD */ bool Encrypt; /* Encryption used by FD */ bool stats_enabled; /* Keep all job records in a table for long term statistics */ + bool no_maxtime; /* Don't check Max*Time for this JCR */ #endif /* DIRECTOR_DAEMON */ diff --git a/bacula/technotes b/bacula/technotes index 2689c92747..99b858e1cd 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -3,6 +3,8 @@ General: 27Apr09 +ebl Fix bug #1274 where a migration job can be canceled like the + original job by the MaxRunTime directive. mvw Added fix for bug #1275 where acl or xattr data is saved for virtual filenames generated by filed plugins. 26Apr09 -- 2.39.5