From: David S. <ds...@td...> - 2006-04-26 14:51:14
|
Thanks for your replies, they confirm what I was guessing. I was hoping to keep this portion pretty low-level, but it sounds like the simplest thing for me is to move it into my Python scripts, so I can get better control. David Quoting Sharon Lucas <lu...@us...>: > Note that STAX provides many more functions than SXE as an execution > engine so you may want to look into using it instead if you want to check > return codes and results from processes and other STAF commands and use if > logic, etc. to do something if a process fails. > > -------------------------------------------------------------- > Sharon Lucas > IBM Austin, lu...@us... > (512) 838-8347 or Tieline 678-8347 > > > > > Charles Rankin/Austin/IBM@IBMUS > Sent by: sta...@li... > 04/26/2006 08:34 AM > > To > sta...@li... > cc > > Subject > Re: [staf-users] SXE not stopping on non-zero return > > > > > > > > I think that SXE is operating correctly. There is a distinction between > the PROCESS START command returning non-zero (indicating that it couldn't > start the process) and the command that is started returning non-zero. SXE > will detect the first situation, but will not detect the second, as SXE > got a zero RC from the PROCESS START request. Remember that SXE doesn't > actually know anything about the service requests that it is executing, so > it doesn't inspect the returned Result Buffer. It only looks at the RC > returned from the request, which will always be zero if the PROCESS > service is able to START the specified command (regardless of that > commands return code). > > It doesn't seem like it would be too hard to add some special syntax to > SXE to tell it to start a process so that it knows to look into the result > buffer for a successful execution. > > Charles Rankin > > > > David Swift <ds...@td...> > Sent by: sta...@li... > 04/25/2006 07:19 PM > > > To > sta...@li... > cc > > Subject > [staf-users] SXE not stopping on non-zero return > > > > > > > > > Running STAF 3.1.3, SXE 3.0.1. SXE is showing a non-zero return code in > the log, but is not stopping execution. The failing command is on the > 5th line of the SXE file. Subsequent commands also fail, but do not stop. > > > The SXE file looks like this: > local VAR SET VAR STAF/Service/SXE/LogLevel=Command > local VAR SET VAR STAF/Service/SXE/ElapsedTarget=0:1:0.0 > local VAR SET VAR STAF/Service/SXE/ElapsedTolerance=0 > local process start command umount parms /mw/mwcl-data STDERRTOSTDOUT > RETURNSTDOUT wait > local process start command umount parms /dev/sdb1 STDERRTOSTDOUT > RETURNSTDOUT wait > local process start command mkfs.reiserfs parms -q /dev/sdb1 > STDERRTOSTDOUT RETURNSTDOUT wait > local process start command mount parms /dev/sdb1 /mw STDERRTOSTDOUT > RETURNSTDOUT wait > local process start command mkdir parms /mw/mwcl-data STDERRTOSTDOUT > RETURNSTDOUT wait > local process start command mount parms bacon:/data01/mwcl-data > /mw/mwcl-data STDERRTOSTDOUT RETURNSTDOUT wait > > > The log returned looks like this: > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : End > Command: local VAR SET VAR STAF/Service/SXE/LogLevel=Command > Result : > } > } > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : Begin > Command: local VAR SET VAR STAF/Service/SXE/ElapsedTarget=0:1:0.0 > Result : <None> > } > } > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : End > Command: local VAR SET VAR STAF/Service/SXE/ElapsedTarget=0:1:0.0 > Result : > } > } > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : Begin > Command: local VAR SET VAR STAF/Service/SXE/ElapsedTolerance=0 > Result : <None> > } > } > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : End > Command: local VAR SET VAR STAF/Service/SXE/ElapsedTolerance=0 > Result : > } > } > { > Date-Time: 20060425-16:44:15 > Level : Info > Message : { > Action : Begin > Command: local process start command umount parms /mw/mwcl-data > STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:16 > Level : Info > Message : { > Action : End > Command: local process start command umount parms /mw/mwcl-data > STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 0 > Key : <None> > Files : [ > { > Return Code: 0 > Data : > } > ] > } > } > } > { > Date-Time: 20060425-16:44:16 > Level : Info > Message : { > Action : Begin > Command: local process start command umount parms /dev/sdb1 > STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:17 > Level : Info > Message : { > Action : End > Command: local process start command umount parms /dev/sdb1 > STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 1 > Key : <None> > Files : [ > { > Return Code: 0 > Data : umount: /mw: device is busy > umount: /mw: device is busy > > } > ] > } > } > } > { > Date-Time: 20060425-16:44:17 > Level : Info > Message : { > Action : Begin > Command: local process start command mkfs.reiserfs parms -q > /dev/sdb1 STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:24 > Level : Info > Message : { > Action : End > Command: local process start command mkfs.reiserfs parms -q > /dev/sdb1 STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 0 > Key : <None> > Files : [ > { > Return Code: 0 > Data : mkfs.reiserfs 3.6.19 (2003 www.namesys.com) > > A pair of credits: > Edward Shushkin wrote the encryption and compression file plugins, and > the V3 > journal relocation code. > > Oleg Drokin was the debugger for V3 during most of the time that V4 > was under > development, and was quite skilled and fast at it. He wrote the > large write > optimization of V3. > > > > } > ] > } > } > } > { > Date-Time: 20060425-16:44:24 > Level : Info > Message : { > Action : Begin > Command: local process start command mount parms /dev/sdb1 /mw > STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:25 > Level : Info > Message : { > Action : End > Command: local process start command mount parms /dev/sdb1 /mw > STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 32 > Key : <None> > Files : [ > { > Return Code: 0 > Data : mount: /dev/sdb1 already mounted or /mw busy > mount: according to mtab, /dev/sdb1 is already mounted on /mw > > } > ] > } > } > } > { > Date-Time: 20060425-16:44:25 > Level : Info > Message : { > Action : Begin > Command: local process start command mkdir parms /mw/mwcl-data > STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:26 > Level : Info > Message : { > Action : End > Command: local process start command mkdir parms /mw/mwcl-data > STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 1 > Key : <None> > Files : [ > { > Return Code: 0 > Data : mkdir: cannot create directory `/mw/mwcl-data': > File exists > > } > ] > } > } > } > { > Date-Time: 20060425-16:44:26 > Level : Info > Message : { > Action : Begin > Command: local process start command mount parms > bacon:/data01/mwcl-data /mw/mwcl-data STDERRTOSTDOUT RETURNSTDOUT wait > Result : <None> > } > } > { > Date-Time: 20060425-16:44:27 > Level : Info > Message : { > Action : End > Command: local process start command mount parms > bacon:/data01/mwcl-data /mw/mwcl-data STDERRTOSTDOUT RETURNSTDOUT wait > Result : { > Return Code: 0 > Key : <None> > Files : [ > { > Return Code: 0 > Data : > } > ] > } > } > } > { > Date-Time: 20060425-16:44:27 > Level : Stop > Message : { > Loop Number: 1 > Time : 16:44:27.022 > } > } > { > Date-Time: 20060425-16:44:27 > Level : Pass > Message : { > Loop Number : 1 > Elapsed Time : 0:0:11.207 > Elapsed Target : 0:1:0.0 > Elapsed Tolerance Percent: 0 > } > } > ] > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > staf-users mailing list > sta...@li... > https://lists.sourceforge.net/lists/listinfo/staf-users > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |