Entering maintenance mode for Liberty collectives
Enter maintenance mode before you perform diagnostic tests, maintenance, or tuning, on a host or server. Maintenance mode can prevent the disruption of client requests by routing client traffic around a server that is in maintenance mode, to another server.
About this task
When a server that is a scaling member is in maintenance mode, the scaling controller cannot start or stop that server. The server does not count toward the minimum or maximum running instance settings for the cluster.
When a host is in maintenance mode, the scaling controller cannot provision a new server on that host.
You can enter maintenance mode on a server that is joined to a collective or on a host that is registered to a collective.
You can use maintenance mode to alter the routing of requests by a web server that is enabled for Intelligent Management.
Entering a server or a host into maintenance mode is a persistent change. A server or host remains in maintenance mode even if the server is restarted until the mode is explicitly changed.
Procedure
Example
In this example, the hostc has a collective controller. The collective
controller has the scaling controller and dynamic routing features enabled. In the
server.xml file of the scaling controller, the minimum number of active cluster
members is set to 1
. Host1 has two started cluster members,
memberA1 for cluster A and memberB1 for
cluster B. Host2 has one stopped cluster member,
memberA2 for cluster A. All cluster members have the scaling
member feature enabled. A web server that is enabled for Intelligent Management also exists, which
is routing requests to the cluster members.
wlp/bin/collective enterMaintenanceMode
--host=hostc
--port=controller1HttpsPortNumber
--user=adminUser
--password=adminPassword
--hostName=host1
To reduce the number of options needed, use the
--controller
option instead of --user
, --password
,
--host
, and --port
.
wlp/bin/collective enterMaintenanceMode --controller=adminUser:adminPassword@hostc:controller1HttpsPortNumber --hostName=host1
Successfully enter maintenance mode for host1. An alternate server must be started. Maintenance mode will be set for memberA1 when the alternate server is started. Could not enter maintenance mode for memberB1 because an alternate server is not available.
The scaling controller starts memberA2 as a replacement for memberA1. After memberA2 is started, then memberA1 is placed into maintenance mode. The web server no longer routes HTTP requests to memberA1.
The scaling controller cannot replace memberB1, therefore the member is not
placed into maintenance mode. You can run the command again by using the --force
argument to force memberB1 to be placed into maintenance mode, which can affect
the performance of the requests running in clusterB.
What to do next
The health controller also uses server maintenance mode as an action that is taken when the health policy is breached. For example, if you are using an excessive response time condition, and the response time exceeds the specified average response time threshold for a server, then the server can move to maintenance mode.