From 12b8fd96780583d7393c5e851f81a00ba653e347 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 26 May 2008 20:19:56 +0000 Subject: [PATCH] Ensure correct client specified when checking for zombies git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7034 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/bacula-dir-tape.conf.in | 33 +++++++++++++++++++++++++ regress/scripts/check_for_zombie_jobs | 6 +++-- regress/scripts/functions | 2 ++ regress/tests/two-pool-test | 5 ++-- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/regress/scripts/bacula-dir-tape.conf.in b/regress/scripts/bacula-dir-tape.conf.in index bf1bb5cc8a..05bfa5b38e 100644 --- a/regress/scripts/bacula-dir-tape.conf.in +++ b/regress/scripts/bacula-dir-tape.conf.in @@ -21,6 +21,7 @@ Director { # define myself Maximum Concurrent Jobs = 4 Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" Messages = Daemon + FD Connect Timeout = 2min } # @@ -40,6 +41,25 @@ Job { # Prefer Mounted Volumes = no } +# +# Note, this client does not exist so the job will +# fail +# +Job { + Name = "Offline" + Type = Backup + Client=@hostname@-fd1 + FileSet="Full Set" + Storage = DDS-4 + Messages = Standard + Pool = Default + Write Bootstrap = "@working_dir@/NightlySave.bsr" + Maximum Concurrent Jobs = 4 + SpoolData = yes +# Prefer Mounted Volumes = no +} + + Job { Name = "NightlySave1" Type = Backup @@ -158,6 +178,19 @@ Client { Maximum Concurrent Jobs = 4 } +Client { + Name = @hostname@-fd1 + Address = @hostname@ + FDPort = 1@fdport@ # nothing should be on this port!!!!! + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 30d # 30 days + Job Retention = 180d # six months + AutoPrune = yes # Prune expired Jobs/Files + Maximum Concurrent Jobs = 4 +} + + # Definition of DDS tape storage device Storage { Name = DDS-4 diff --git a/regress/scripts/check_for_zombie_jobs b/regress/scripts/check_for_zombie_jobs index d35a5ffc37..b1f689ee20 100755 --- a/regress/scripts/check_for_zombie_jobs +++ b/regress/scripts/check_for_zombie_jobs @@ -4,19 +4,21 @@ # Also scan logs for ERROR messages # +. ./config + # check_for_zombie_jobs storage=STORAGE [client=localhost-fd] if [ $# = 2 ] ; then client="$2" else - client="client" + client=${HOST}-fd fi bin/bconsole -c bin/bconsole.conf <&1 >/dev/null @output tmp/dir.out status dir @output tmp/fd.out -status $client +status client=${client} @output tmp/sd.out status $1 @output diff --git a/regress/scripts/functions b/regress/scripts/functions index dbbc8e734e..b583255680 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -2,6 +2,7 @@ # A set of useful functions to be sourced in each test # + start_test() { # Turn off email @@ -279,3 +280,4 @@ fi # Source the configuration variables . ${cwd}/config + diff --git a/regress/tests/two-pool-test b/regress/tests/two-pool-test index 9e3fe2b581..b5d235ae19 100755 --- a/regress/tests/two-pool-test +++ b/regress/tests/two-pool-test @@ -23,7 +23,6 @@ scripts/prepare-two-disks echo "${cwd}/build" >${cwd}/tmp/file-list echo "${cwd}/build" >${cwd}/tmp/file-list echo "${cwd}/build" >${cwd}/tmp/file-list -echo "${cwd}/build" >${cwd}/tmp/file-list start_test @@ -39,13 +38,11 @@ list volumes @# Start job with Client run before and sleep run job=NightlySave1 level=Full pool=Default yes run job=NightlySave1 level=Full pool=Default yes -run job=NightlySave1 level=Full pool=Default yes @# wait between starting jobs @sleep 30 @#setdebug level=100 storage=DDS-4 run job=NightlySave2 level=Full pool=Full yes run job=NightlySave2 level=Full pool=Full yes -run job=NightlySave2 level=Full pool=Full yes @sleep 10 messages @sleep 10 @@ -60,6 +57,8 @@ messages @# now do a restore @# @$out tmp/log2.out +release storage=DDS-4 drive=0 +release storage=DDS-4 drive=1 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done yes wait -- 2.39.5