3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # This should expose bug #7302
8 # This script uses the virtual disk autochanger and 30 drives
10 TestName="next-vol-bug-7302"
15 scripts/copy-2disk-tape-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19 change_jobname NightlySave $JobName
22 # Turn on automatic label
23 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "LabelFormat", "vol", "Pool")'
24 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "LabelMedia", "yes", "Device")'
26 # Allow only one job per volume
27 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "MaximumVolumeJobs", "1", "Pool")'
28 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "MaximumConcurrentJobs", "1", "Device")'
31 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "SpoolData", "no", "Job")'
33 # Create 30 drives for autochanger tape
34 for i in `seq 2 40`; do
35 $bperl -e 'extract_resource("$conf/bacula-sd.conf", "Device", "Drive-0")' | \
36 sed "s/Drive-0/Drive-$i/" >> $conf/bacula-sd.conf
39 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Device", join(",", map { "Drive-$_" } 0..30), "Autochanger", "tape")'
41 # Write out bconsole commands
42 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
45 @$out ${cwd}/tmp/log1.out
46 @#setdebug level=100 client=$CLIENT
47 setbandwidth client limit="2000 kb/s"
48 run job=$JobName level=Full Pool=Default yes
49 run job=$JobName level=Full Pool=Default yes
50 run job=$JobName level=Full Pool=Default yes
51 run job=$JobName level=Full Pool=Default yes
52 run job=$JobName level=Full Pool=Default yes
53 run job=$JobName level=Full Pool=Default yes
54 run job=$JobName level=Full Pool=Default yes
55 run job=$JobName level=Full Pool=Default yes
56 run job=$JobName level=Full Pool=Default yes
57 run job=$JobName level=Full Pool=Default yes
58 run job=$JobName level=Full Pool=Default yes
59 run job=$JobName level=Full Pool=Default yes
60 run job=$JobName level=Full Pool=Default yes
61 run job=$JobName level=Full Pool=Default yes
62 run job=$JobName level=Full Pool=Default yes
63 run job=$JobName level=Full Pool=Default yes
64 run job=$JobName level=Full Pool=Default yes
65 run job=$JobName level=Full Pool=Default yes
66 run job=$JobName level=Full Pool=Default yes
67 run job=$JobName level=Full Pool=Default yes
68 run job=$JobName level=Full Pool=Default yes
69 run job=$JobName level=Full Pool=Default yes
70 run job=$JobName level=Full Pool=Default yes
71 run job=$JobName level=Full Pool=Default yes
72 run job=$JobName level=Full Pool=Default yes
73 run job=$JobName level=Full Pool=Default yes
74 run job=$JobName level=Full Pool=Default yes
75 run job=$JobName level=Full Pool=Default yes
76 run job=$JobName level=Full Pool=Default yes
77 run job=$JobName level=Full Pool=Default yes
78 run job=$JobName level=Full Pool=Default yes
79 run job=$JobName level=Full Pool=Default yes
80 run job=$JobName level=Full Pool=Default yes
81 run job=$JobName level=Full Pool=Default yes
82 run job=$JobName level=Full Pool=Default yes
83 run job=$JobName level=Full Pool=Default yes
84 run job=$JobName level=Full Pool=Default yes
85 run job=$JobName level=Full Pool=Default yes
86 run job=$JobName level=Full Pool=Default yes
87 run job=$JobName level=Full Pool=Default yes
88 run job=$JobName level=Full Pool=Default yes
89 run job=$JobName level=Full Pool=Default yes
90 run job=$JobName level=Full Pool=Default yes
91 run job=$JobName level=Full Pool=Default yes
102 setbandwidth client limit="100000000 kb/s"
113 check_for_zombie_jobs storage=tape