clusterRemoveServer

This method removes a server from the cluster. The removal process may be asynchronous if Session Clustering is used. If this is the case, the initial operation will return an HTTP 202 response. As long as the server is not fully removed, further calls to remove the same server should be idempotent. On a Zend Server Cluster Manager with no valid license, this operation fails.

 

 

Required Permissions: full

HTTP method: POST

Supported by Editions: Zend Server Cluster Manager

Request Parameters:

Parameter

 Type

Required

Description

serverId

String

Yes

The server ID

force

Boolean

No

Force-remove the server, skipping graceful shutdown process. Default is FALSE

 

Expected Response Code:

Response Type: serverInfo with the status of the server being removed. The status is expected to be either shuttingDown or removed.

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchServer

There is no server with the provided server ID.

500

cantConnectToServer

Zend Server Cluster Manager is unable to connect to the specified server.

500

invalidServerResponse

An invalid or unexpected response from the server.

503

temporarilyLocked

The server cannot be removed because another server in the cluster is performing a  graceful startup/shutdown.

405

notImplementedByEdition

The method is not implemented by this edition of Zend Server.

500

serverNotLicensed

Zend Server Cluster Manager is not licensed.

 

Usage Example

Example:

Request (headers removed for clarity):

POST /ZendServerManager/Api/clusterRemoveServer
serverId=5

Response:

HTTP/1.0 202 Accepted
<?xml version="1.0" encoding="UTF-8"?>
<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.0">
    
  <requestData>
    <apiKeyName>angel.eyes</apiKeyName>
    <method>clusterRemoveServer</method>
  </requestData>
  
  <responseData>
    <serverInfo>
      <id>5</id>
      <name>www-02</name>
      <address>https://www-02.local:10082/ZendServer</address>
      <status>shuttingDown</status>
      <messageList />
    </serverInfo>
  </responseData>
</zendServerAPIResponse>

 

 

 

Related Links

Related Links:

Server and Cluster Management Methods