Setting Quarantine Status on Engines

There are two ways to set and clear quarantine status: interactively with the GridServer Administration Tool, or programmatically with the GridServer Admin API. You can also use the API to self-quarantine Engines. Each method is described below. Also, the following constraints apply when setting quarantine status:

Due to XML limitations for Engine properties, special XML chars are not allowed in the QuarantineStatus property.
If there is a problem setting the QuarantineStatus property, it throws an AcccessException (a subclass of AdminException) based on the new value.

Using the GridServer Administration Tool

Use the Administration Tool to set or modify the QuarantineStatus property in one of the following ways:

From Grid Components > Engines > Daemon Admin, select Edit/View Properties from the Actions list. Select QuarantineStatus from the Properties column, and enter a new value.
From Grid Components > Engines > Daemon Admin, select Set Property for Daemons on Page, then select QuarantineStatus from the Engine Property List, and change the value of the Property.

Using the Admin API

The following method in the EngineDaemonAdmin Admin API interface can be used to set and clear Engine Daemon quarantine status:

public String setProperty(long id, String key, String value) throws Exception

The value of key must be QuarantineStatus to set the Engine Daemon quarantine status. The value id is the identifier of the interested Engine Daemon. The value might be retrieved by calling EngineDaemonAdmin.getEngineDaemonIds().

The corresponding API call for setProperty are also available for C++ (dsdriver::EngineDaemonAdmin.setProperty) and .NET (EngineDaemonAdmin.SetProperty)

Engine Self-Quarantine Using an API Call

You can also quarantine an Engine using the following method in the Java API:

com.datasynapse.gridserver.engine.EngineSession.quarantine (String reason) throws GridServerException;

This method might be called in a Service Session. When this method is called, a synchronous message is sent to the Broker, the Broker then forwards the message plus the Engine session ID to the active Director synchronously. When the Director receives the message, it finds the Daemon ID based on the Engine session ID and sets the Engine property. The Director asynchronously restarts the Engine Daemon identified by the Daemon ID. If any exception occurs, it propagates back to the Engine. Due to the fact that the Engine ID is not passed from the Engine to the Broker, this API call can not quarantine any other Engine Daemons besides the managing Daemon of the current Engine.

The affected Engine Daemon restarts for the quarantine status change to take effect. When the affected Engines receive the restart command, any running Services are canceled, as usual.

The corresponding API call for quarantine are also available for C++ (dsdriver::EngineSession.quarantine) and .NET (EngineSession.quarantine)