Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000155bareos-core[All Projects] directorpublic2013-04-18 10:252015-03-25 19:18
Reporteruser12 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.04
Product Version12.4.2 
Target Version12.4.4Fixed in Version12.4.4 
Summary0000155: runafterjob doesn't get executed if a runscript directive is placed before the directive runafterjob
Descriptionevidently the order in which runafterjob and runscript are placed in a job resource effects whether runafterjob get executed or not.

place:
runafterjob = ...
Runscript {...}

runafterjob gets executed

reverse order:
Runscript {...}
runafterjob = ...

runafterjob does not get executed
Steps To Reproduce### Copy2Tape Jobs ###
Job {
  Name = "Copy2Tape"
  Type = Copy
  JobDefs = "StdLinux"
  Level = Full
  Pool = VFB
  Messages = Tapes_entnehmen
  Storage = VFB
  Schedule = Copy2Tape
  Selection Type = SQLQuery
  Selection Pattern = "SELECT max(JobId) FROM Job as J ,Pool as P WHERE J.poolid = P.poolid and J.Level='F' AND J.Type='B' AND J.JobStatus IN ('T','W') AND P.name = 'VFB';"
  Maximum Concurrent Jobs = 6
  Priority = 14
  RunScript {
    Console = "export storage=TSL dstslots=5 volume=%V"
    RunsWhen = After
    RunsOnClient = no
  }
  RunAfterJob = "/bin/bash -c \"/bin/echo Remove Tape %V from Slot 5 |/usr/sbin/bsmtp -h localhost -f '(Remove Tape %V Slot 5)' -s 'Remove Tape %V from Slot 5' root@localhost"
}
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action
Attached Files

- Relationships

-  Notes
(0000365)
mvwieringen (developer)
2013-04-22 11:17

I need some debugging output to see what is happening.

I guess these are director runscripts only right ?

If so a capture of a bareos-dir -f -d 200 would be handy to do the first
analyze.
(0000447)
user12
2013-06-06 17:48

works with Version 12.4.3-657.1
(0000593)
mvwieringen adm (administrator)
2013-08-13 03:12

Fix committed to bareos bareos-12.4 branch with changesetid 945.
(0001379)
mvwieringen (developer)
2015-03-25 16:51

Fix committed to bareos2015 bareos-13.2 branch with changesetid 4235.
(0001533)
joergs (administrator)
2015-03-25 19:18

Due to the reimport of the Github repository to bugs.bareos.org, the status of some tickets have been changed. These tickets will be closed again.
Sorry for the noise.

- Related Changesets
bareos: bareos-12.4 9d5f6267
Timestamp: 2013-05-04 11:15:03
Author: mvwieringen adm
Ported: N/A
Details ] Diff ]
Return right returnvalue on import/export/move cmd.

We were always returning 0 (e.g. operation failed) for
the import/export/move commands. This makes any runscript fail
any next runscript and the Job also fails.

Fixes 0000146: Variable "Job Exit Code" in mailcommand reports always
"Error" when doing copy or migration job
Fixes 0000155: runafterjob doesn't get executed if a runscript directive is
placed before the directive runafterjob
mod - src/dird/ua_impexp.c Diff ] File ]
bareos2015: bareos-12.4 729d2238
Timestamp: 2013-05-04 13:15:03
Author: mvwieringen
Ported: N/A
Details ] Diff ]
Return right returnvalue on import/export/move cmd.

We were always returning 0 (e.g. operation failed) for
the import/export/move commands. This makes any runscript fail
any next runscript and the Job also fails.

Fixes 0000146: Variable "Job Exit Code" in mailcommand reports always
"Error" when doing copy or migration job
Fixes 0000155: runafterjob doesn't get executed if a runscript directive is
placed before the directive runafterjob
mod - src/dird/ua_impexp.c Diff ] File ]
bareos: master b93d0fdb
Timestamp: 2013-05-04 19:25:16
Author: mvwieringen adm
Ported: N/A
Details ] Diff ]
Return right returnvalue on import/export/move cmd.

We were always returning 0 (e.g. operation failed) for
the import/export/move commands. This makes any runscript fail
any next runscript and the Job also fails.

Fixes 0000146: Variable "Job Exit Code" in mailcommand reports always
"Error" when doing copy or migration job
Fixes 0000155: runafterjob doesn't get executed if a runscript directive is
placed before the directive runafterjob
mod - src/dird/ua_impexp.c Diff ] File ]
bareos2015: bareos-13.2 f59a541b
Timestamp: 2013-05-04 21:25:16
Author: mvwieringen
Ported: N/A
Details ] Diff ]
Return right returnvalue on import/export/move cmd.

We were always returning 0 (e.g. operation failed) for
the import/export/move commands. This makes any runscript fail
any next runscript and the Job also fails.

Fixes 0000146: Variable "Job Exit Code" in mailcommand reports always
"Error" when doing copy or migration job
Fixes 0000155: runafterjob doesn't get executed if a runscript directive is
placed before the directive runafterjob
mod - src/dird/ua_impexp.c Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-04-18 10:25 user12 New Issue
2013-04-22 11:17 mvwieringen Note Added: 0000365
2013-04-22 11:17 mvwieringen Assigned To => mvwieringen
2013-04-22 11:17 mvwieringen Status new => feedback
2013-04-22 11:22 mvwieringen Target Version => 12.4.4
2013-04-23 16:29 mvwieringen Changeset attached => bareos master c48f866f
2013-04-23 16:29 mvwieringen Note Added: 0000370
2013-04-23 16:29 mvwieringen Status feedback => closed
2013-04-23 16:29 mvwieringen Resolution open => fixed
2013-04-23 16:29 mvwieringen Changeset attached => bareos Branch-12.4 e47164f2
2013-04-23 16:29 mvwieringen Note Added: 0000372
2013-04-23 16:30 mvwieringen Assigned To mvwieringen =>
2013-04-23 16:30 mvwieringen Fixed in Version => 12.4.4
2013-04-23 17:41 mvwieringen Status closed => resolved
2013-04-23 17:44 mvwieringen Assigned To => user12
2013-04-23 17:44 mvwieringen Status resolved => assigned
2013-04-23 17:44 mvwieringen Status assigned => resolved
2013-04-24 09:51 mvwieringen Assigned To user12 =>
2013-06-06 17:48 user12 Note Added: 0000447
2013-06-06 17:48 user12 Status resolved => closed
2013-06-06 17:48 user12 Assigned To => user12
2013-08-13 03:12 mvwieringen adm Changeset attached => bareos master b93d0fdb
2013-08-13 03:12 mvwieringen adm Changeset attached => bareos bareos-12.4 9d5f6267
2013-08-13 03:12 mvwieringen adm Note Added: 0000593
2013-08-13 03:12 mvwieringen adm Assigned To user12 => mvwieringen adm
2013-08-13 03:12 mvwieringen adm Status closed => resolved
2013-08-13 09:22 mvwieringen adm Note Deleted: 0000370
2013-08-13 09:22 mvwieringen adm Note Deleted: 0000372
2013-08-13 09:23 mvwieringen adm Assigned To mvwieringen adm =>
2013-08-13 09:23 mvwieringen adm Status resolved => closed
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-12.4 729d2238
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-13.2 f59a541b
2015-03-25 16:51 mvwieringen Note Added: 0001379
2015-03-25 16:51 mvwieringen Status closed => resolved
2015-03-25 19:18 joergs Note Added: 0001533
2015-03-25 19:18 joergs Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker