About planned server shutdowns

The Server Tools Cluster Members screen provides the ability to start a planned or scheduled shutdown of a specific server in the PolicyCenter cluster. This action affects only the server on which you start or stop the scheduled shutdown. The Actions column of the Application Server Instances table contains a button that toggles between Start planned shutdown and Cancel planned shutdown, depending on whether a server shutdown is currently scheduled.

Scheduling a server shutdown

Clicking Start planned shutdown opens the Schedule Planned Shutdown screen. From this screen, you can set the details of the planned server shutdown. In this screen, you need to set the following items:
Banner text Choose the text of the banner message to show on the PolicyCenter screen to warn users of the server shutdown. The banner message occurs immediately as you schedule the shutdown and contains a countdown to the time of the scheduled shutdown. You can choose from several listed messages or create your own custom message.
Shutdown date and time Set the date and time of the server shutdown.
Action to take with respect to running batch processes Decide how to handle any currently running batch processes
After you initiate a scheduled shutdown, PolicyCenter does the following on the affected server:
  • It does not start any new batch processes.
  • It manages the stopping of any currently running batch processes depending on the setting for Terminate Batch Processes field.
  • It requests that all work queues and message destinations stop processing immediately.
  • It completes the transmission of any current messages without starting any new message transmissions.
  • It completes the processing of any current work items without beginning work on any new work items.
After you click OK in the Schedule Planned Shutdown confirmation dialog, PolicyCenter reopens the Cluster Members screen. In this screen, you now see the following:
  • The Actions entry for the affected server contains a Cancel planned shutdown button.
  • The Planned Shutdown entry for the affected server provides information about the planned shutdown.
  • The screen contains a banner with the chosen shutdown message and a countdown timer to the server shutdown date and time.

Shutdown message details

You have several choices for shutdown messages in the Schedule Planned Shutdown screen. If you do not elect to create a custom message, you can select one of several default messages. PolicyCenter stores these messages as display keys in file display.properties.
Web.TabBar.SystemAlertBar.PlannedShutdown.RollingUpgradeMessage Rolling upgrade in progress, please save your work and log out to redirect to a new server.
Web.TabBar.SystemAlertBar.PlannedShutdown.ScaleInMessage Please save your work and log out to re-direct to the new server.
After you initiate a planned shutdown, PolicyCenter stores only the current time and the shutdown time in the database. It stores other information, such as the shutdown message itself, in a single-threaded atomic reference in memory. PolicyCenter clears this message reference under the following conditions:
  • At the restart of the shutdown PolicyCenter server
  • At the cancellation of the planned server shutdown

Logging into PolicyCenter during a planned server shutdown

Guidewire does not restrict the ability of a credentialed user to log into a PolicyCenter server that is undergoing a planned shutdown. However, upon logging into the server, that user sees the alert banner that a planned shutdown is in progress with a message instructing the user to log out. If you want to redirect users away from the server undergoing shutdown, Guidewire recommends that you delegate this function in the load balancer configuration.

Terminating running batch processes

The Schedule Planned Shutdown screen contains a Terminate Batch Processes checkbox. PolicyCenter terminates the running batch processes differently depending how you set this field.
Terminate Batch Processes Result
Checked PolicyCenter sets a flag on all currently running batch processes (including workqueue writers) assigned to this server to terminate their operation. To the extent that the batch process logic permits, the process attempts to stop as gracefully and as safely as possibly.
Unchecked PolicyCenter does not instruct the currently running batch processes on this server to terminate prematurely. All batch processes assigned to this server continue until completed, regardless of how long it takes to complete the work.

In either case, PolicyCenter does not show a Planned Shutdown status of ready on the Cluster Members screen until all the affected processes have stopped on the server.

Note: Batch processes run as non-daemon threads. As such, it is not possible for the server to perform a graceful shutdown if any batch processes are still running on the server at the time of the shutdown.

Using system tools to schedule a shutdown

It is also possible to initiate a scheduled shutdown of a server using either the SystemToolsAPI web service or its associated system_tools command prompt option. For example, the system_tools command uses the following syntax:
  • system_tools -user user -password password -scheduleshutdown serverId [-terminatebatchprocesses -shutdowndelay minutes]

If you include the -terminatebatchprocesses command option, the shutdown process is the same as if you checked the Terminate Batch Processes check box in the Schedule Planned Shutdown screen.

For more information on the use of the system_tools command, see system_tools command. For information on the use of the SystemToolsAPI web service, see the PolicyCenter Integration Guide.