I don't know if there is really enough utility to warrant adding it, but I
think a new option could be added to the SHUTDOWN SHUTDOWN command (maybe
DELAY <x>) which would delay the shutdown request for a specified amount
of time. Then a new SHUTDOWN ABORT command could be specified during that
window. I could see STAFProc spitting out a shutdown warning message in
its stdout (or stderr), and even possibly setting a new STAF variable
indicating the shutdown. If you got real elaborate, there could be a new
setting in the STAF.cfg (maybe even dynamically alterable) which would
specify an application to be started when the DELAY option was specified
(and now that I think about it, the app could be specified on the SHUTDOWN
request as well), and the DELAY value specified would be passed to the
application. The application itself would be responsible for user
display, notification, and generating an ABORT (if necessary).
All that having been said, once the actual SHUTDOWN sequence has been
initiated internally (after the DELAY time has elapsed with no intervening
ABORT), STAF *is* going to unconditionally shut down (as it does today).
No further ABORT would be honored.
Charles Rankin
From:
Mohammad Jamal <md.shahid.ja...@gmail.com>
To:
Joseph J Veilleux/Lexington/i...@ibmus
Cc:
staf-users@lists.sourceforge.net, David Bender/Austin/i...@ibmus
Date:
06/11/2009 12:05 AM
Subject:
Re: [staf-users] How to prevent shutdown of STAF?
On Fri, Jun 5, 2009 at 9:29 PM, Joseph J Veilleux <joeveill...@us.ibm.com>
wrote:
While most operating systems (UNIX, Linux, et al) don't offer this
capability (to abort a pending/in-progress shutdown), Windows does provide
that capability. In my opinion this is a bad feature and I don't like it,
but there it is. That's probably where the requester got the idea. Score
one for Microsoft.
To see this feature in operation, do the following:
1. Go to a Windows machine (any comparatively-modern version of Windows:
2000, XP, 2003, and I think 2008 and Vista too).
2. Open two command prompt windows.
3. In the first command prompt window, type the following command BUT
DON'T PRESS ENTER (yet):
shutdown -a
4. Open a second command prompt window, type a command like the following
and press Enter:
shutdown -r -t 60 -c "Testing abort-system-shutdown"
This pops up a UI with a countdown timer stating that the system will
shut down in 60 seconds (...59, 58, 57,.....)
5. Quickly go back to the first command-prompt window and press Enter.
This executes the 'shutdown -a' command which will abort the in-progress
system shutdown.
The requester seems to be asking for a feature like this for STAF. Offhand
I'm not sure I see the value, but maybe that's just me.
David's suggestion to pop up some kind of UI to ask the user if they're
really sure is OK, except that it doesn't offer the opportunity to reply
in the negative (i.e. "no, I don't want you to shut down!") other than by
leaving the UI up indefinitely. Perhaps if the STAF shutdown service was
enhanced to accept an 'abort' action, to abort an already-in-progress
shutdown, then that's all that would be needed. The STAF team wouldn't
have to build any kind of a fancy UI because the method David suggests
could be used to build a UI.... and if the user told the UI "no, I do not
want to shut down" then the UI program could issue the new STAF LOCAL
SHUTDOWN ABORT command.
Providing 'ABORT' command in 'SHUTDOWN' service would be a better option.
As an aside, the requester's real desire does not seem to be this
complicated (to be able to dynamically "steer" an in-progress
system-shutdown). Really they are just looking to make sure that STAF is
up all the time. That could be handled in other ways. One crude way would
be to use 'cron' (on UNIX/Linux) or the Windows 'scheduled task' facility
to start STAF every minute or so. Most times STAF would already be running
so the command would notice and quit. ...but if STAF had been shut down,
this would start it back up. Obviously that's a little crude because
there's the potential for a minute or so gap in STAF being available.
In this case, if the STAFProc is restarted, then again it is required to
submit the STAXJob to the STAX execution engine and all the previously
used shared variable losts.
A more robust solution would be to write a "watchdog" program to sit
around STAFProc, to start it and wait on its completion. If it completes,
start it again. Obviously that has the potential to go haywire (what if
there's a configuration problem and STAF won't start? this would sit in a
loop and probably grind the system to a halt), but if carefully
implemented it might yield the desired result.
Hope this helps...
----------------------------------------------------------------------------------------
Joe Veilleux
IBM/Lotus Domino Server Quality Engineering
5 Technology Park Drive
Westford MA 01886
Email: joeveill...@us.ibm.com
David Bender/Austin/i...@ibmus
06/05/2009 10:11 AM
To
Mohammad Jamal <md.shahid.ja...@gmail.com>
cc
staf-users@lists.sourceforge.net
Subject
Re: [staf-users] How to prevent shutdown of STAF?
I don't think we'll be adding this capability to STAF. Shutting down STAF
is similar to shutting down an operating system...if you submit a shutdown
request to the OS, it is going to shut down, and therre's no way to
"cancel" it.
However, there is a way you could have an additional confirmation during
the STAF shutdown. In STAF V3.2.4 we added a new "LifeCycle" service (
http://staf.sourceforge.net/current/STAFUG.htm#HDRLIFECYCLESRV) that
allows you to register STAF service requests that you want to have
executed when STAFProc starts or shuts down. You could register a request
that would act as the confirmation of the shutdown. Here is a simplified
example:
$ STAF local LIFECYCLE REGISTER PHASE shutdown MACHINE local SERVICE
process REQUEST "START SHELL COMMAND notepad WAIT"
In this simplified example we are just submitting a PROCESS START request
to start notepad, and specifying the WAIT option so the request is
synchronous (it will not complete until the notepad is closed). So, when
you submit a "STAF local SHUTDOWN SHUTDOWN" request, the LifeCycle
registrations with a phase of "shutdown" will be executed before STAFProc
actually shuts down. So, the notepad application would be opened, and all
of the other STAF service requests would still continue indefinitely.
Then, when you close the notepad application, the shutdown would continue
as usual.
So, obviously you would not start "notepad" in your scenario, but you
could write a Java app, for example, that would present a UI dialog on the
system, confirming if the user really wanted to shutdown STAF, and if the
user indicated that they wanted to continue shutting down STAF, then the
Java app would exit and the STAF shutdown would continue.
David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com
Mohammad Jamal <md.shahid.ja...@gmail.com>
06/05/2009 07:45 AM
To
David Bender/Austin/i...@ibmus
cc
staf-users@lists.sourceforge.net
Subject
Re: [staf-users] How to prevent shutdown of STAF?
On Wed, Jun 3, 2009 at 5:54 PM, David Bender <bda...@us.ibm.com> wrote:
No, Can you explain why you would need this capability?
As STAF Framework providing the functionalities for running the processes
from one system to another system (if on both the system, STAF Framework
should be running state).
We are working on a tool for performing regression testing of compilers.
This tool uses the services of STAF.
With the help of tool, a testing is started and monitor from a machine
(Test Server) on several other remote machines.
In this process, a STAX Job is created from Test Server and executed on
remote machines. Remote machine user is not involved in this testing
process any ways.
So while executing the STAX Job on remote machine, if STAF framework on
remote machine is closed accidentally, then testing process is also
terminated, and again it is required to start the testing process from the
beginning.
If STAF framework provides some functionality of displaying a warning
message while terminating the STAF framework, then the accidental
termination of STAF framework can be avoided.
David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com
Mohammad Jamal <md.shahid.ja...@gmail.com>
06/03/2009 03:37 AM
To
David Bender/Austin/i...@ibmus
cc
Subject
Re: [staf-users] How to prevent shutdown of STAF?
On Tue, Jun 2, 2009 at 7:07 PM, David Bender <bda...@us.ibm.com> wrote:
No. Once the SHUTDOWN SHUTDOWN request is submitted, STAF will shut down.
Thanks.
Would this feature be included in comming version of STAF?
David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com
Mohammad Jamal <md.shahid.ja...@gmail.com>
06/01/2009 11:53 PM
To
STAF User <staf-users@lists.sourceforge.net>
cc
Subject
[staf-users] How to prevent shutdown of STAF?
Greetings
After executing the command 'STAF LOCAL SHUTDOWN SHUTDOWN', Is there any
way to prevent the process of shutting down of STAF framework?
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to:
http://p.sf.net/sfu/opensolaris-get_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to:
http://p.sf.net/sfu/opensolaris-get_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to:
http://p.sf.net/sfu/opensolaris-get
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users