From: Eric Bollengier Date: Mon, 28 Dec 2020 15:59:56 +0000 (+0100) Subject: Fix #7164 About Director reload issue with missing Job's directive X-Git-Tag: Release-11.3.2~787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c7f9ec56f822da25c962a9d3f32c06edb073337;p=thirdparty%2Fbacula.git Fix #7164 About Director reload issue with missing Job's directive Description: ----------- When a required directive is removed (like the FileSet directive from the Job resource) and the reload command is issued, the Director process is doing a M_ERROR_TERM. 10-Dec 14:31 zog8-dir ERROR TERMINATION "Fileset" directive in Job "BackupClient1" resource is required, but not found. Workaround: ----------- Use bacula-dir -t or breload to validate the configuration before the reload. --- diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index c54d4f8cc..557edeaa6 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -1137,14 +1137,15 @@ static bool check_resources() for (i=0; job_items[i].name; i++) { if (job_items[i].flags & ITEM_REQUIRED) { if (!bit_is_set(i, job->hdr.item_present)) { - Jmsg(NULL, M_ERROR_TERM, 0, _("\"%s\" directive in Job \"%s\" resource is required, but not found.\n"), + Jmsg(NULL, M_FATAL, 0, _("\"%s\" directive in Job \"%s\" resource is required, but not found.\n"), job_items[i].name, job->name()); OK = false; } } /* If this triggers, take a look at lib/parse_conf.h */ if (i >= MAX_RES_ITEMS) { - Emsg0(M_ERROR_TERM, 0, _("Too many items in Job resource\n")); + Jmsg(NULL, M_FATAL, 0, _("Too many items in Job resource\n")); + OK = false; } } if (!job->storage && !job->pool->storage) {