Bacula-users

Re: [Bacula-users] Runscript - fail job on error

2015-02-28 03:10:28
Subject: Re: [Bacula-users] Runscript - fail job on error
From: Kern Sibbald <kern AT sibbald DOT com>
To: Luc Van der Veken <lucvdv AT wimionline DOT com>, "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Sat, 28 Feb 2015 09:05:03 +0100
The answer is no.  The Fail Job On Error  will fail the job if the runscript fails, but if you have a syntax error in the runscript itself, that is so basic that it is always reported back up the chain.



On 27.02.2015 16:11, Luc Van der Veken wrote:

While testing something, I ran into this (director version 5.2.5, Ubuntu 12.04, client is an Ubuntu 14.04 running fd version 5.2.6).

 

Shouldn’t “Fail job on error = No” have made it continue regardless of the error?

 

  RunScript {

    Command = "/etc/bacula/scripts/pre_backup.sh %l"

    Runs on Client = Yes

    Runs When = Before

    Runs On Success = Yes

    Runs On Failure = Yes

    Fail job on error = No

  }

 

I had a syntax error in the script, and got this in the log:

 

2015-02-27 14:48:05   git-luc-fd JobId 26973: Error: Runscript: ClientRunBeforeJob returned non-zero status=2. ERR=Child exited with code 2

2015-02-27 14:48:05   bacula-dir JobId 26973: Fatal error: Bad response to ClientRunBeforeJob command: wanted 2000 OK RunBefore

, got 2905 Bad RunBeforeJob command.

2015-02-27 14:48:05   bacula-dir JobId 26973: Fatal error: Client "git-luc-fd" RunScript failed.

[...]

Start time:             27-Feb-2015 14:48:04

  End time:               27-Feb-2015 14:48:05

  Elapsed time:           1 sec

  Priority:               10

  FD Files Written:       0

  SD Files Written:       0

  FD Bytes Written:       0 (0 B)

  SD Bytes Written:       0 (0 B)

  Rate:                   0.0 KB/s

 



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/


_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>