Shutting down node services gracefully through script
To shut down services running on a node manager without immediately shutting down (and potentially disturbing end users work), start a delayed or graceful shutdown using the command line on the node manager local host.
About this task
This technique is similar to using the Scheduled shutdown functionality from Nodes & Services, but it affects all running services on the node manager local host.
Typically, this technique can be useful when the host is shutting down: For example, for a scale in event or if the host is replaced, then the script is usually integrated in another custom script that might also shut down the node manager after the services have shut down and perform additional necessary logic.
On Linux
- From the terminal,
navigate to the folder containing the file
graceful-shutdown.sh.
By default, this file is located in /opt/tibco/tsnm/version/nm.
- Run the script by entering
./graceful-shutdown.sh
<n>
<delete>, where
<n> represents the
length of the delay before shutdown in seconds, and
<delete>
is eithertrue
(the node manager is deleted on shutdown) or another value, which is interpreted asfalse
(the node manager is not deleted on shutdown).
On Windows
- From the command-line
interface, navigate to the folder containing the file
graceful-shutdown.bat.
By default, this file is located in C:\tibco\tsnm\version\nm.
- Run the script by entering
./graceful-shutdown.bat
<n>
<delete>, where
<n> represents the
length of the delay before shutdown in seconds, and
<delete>
is eithertrue
(the node manager is deleted on shutdown) or another value, which is interpreted asfalse
(the node manager is not deleted on shutdown).
Results
<delete>
is
true
, then the node manager is
deleted.
- Creating resource pools
- Adding resources to resource pools
- Removing resources from resource pools
- Changing the name of a resource pool
- Deleting resource pools
- Updating node managers
- Rolling back a node manager update
- Updating services
- Rolling back a service update
- Shutting down a service instance
- Revoking trust of a node