The nodes are not cleaned up by default. If you'd like to enable this feature, you can set this parameter to e.g. 1 day. Note that cleanup task runs - by default - once per day. But you can change this interval or you can schedule other cleanup task, devoted specifically to cleaning up dead nodes.
Managing cluster nodes
Since 4.1, 4.0.2
This functionality is available since version 4.1, 4.0.2.
|
MidPoint can run in clustered mode with two or more nodes. Here we describe the most important parameters influencing how nodes are named and managed.
Node identification (naming)
Each node in cluster must have a unique node identifier (name).
nodeId vs. nodeIdSource
There are two properties that can be used to set the node identifier:
Property | Meaning | Placement | Alternative specification | Examples |
---|---|---|---|---|
|
A constant value or an expression that yields the node name |
|
|
|
|
Mechanism that is used to derive node Id (obsolete) |
|
|
|
The nodeIdSource
was originally meant as a way to assign node identifiers without the need to specify them as constants.
However, after nodeId
started supporting expressions, nodeIdSource
is now simply translated into nodeId
.
The translation looks like this:
|
So, let’s deal with the syntax of nodeId
only in the following discussion.
Using nodeId property
Since 4.0.2/4.1, midPoint configuration properties support expressions in the form of ${variable}
or ${prefix:variable}
. The first form evaluates using a configuration option specified by variable
. The second one is more general and supports the following prefixes:
Prefix | Meaning | Example |
---|---|---|
|
References given Java system properties. |
|
|
References given operating system environment variables. |
|
|
References local host name as determined by midPoint. Note that the colon after hostname is obligatory. |
|
|
Generates random node ID.
Full format is |
|
|
Uses first available node ID in a given sequence.
Full format is |
|
The sequence
expression works like this:
-
A counter starts at the
start
value, incrementing by 1 up to (and including) theend
value. -
At each step, node name is determined using the formatting string and other parts of the expression, and is checked for availability.
-
If such a node does not exist in the repository, the name is used. Technically speaking, the node name is allocated by creating the node in the repository. If the operation succeeds, the node is acquired. This is to avoid race conditions: only the first midPoint instance that successfully creates a node object can use this name.
-
If a node with a given name exists but the node is permanently down (this is determined by
running
property being set tofalse
) the name is used. This is implemented by removing the node object and then retrying the allocation attempt. -
Names of nodes that are not marked as down but are not alive are not used here. This is to avoid using names of nodes that are e.g. currently booting, or temporarily unavailable. Please see the Node state management section below.
Note that sequence
expression can be combined with other ones.
E.g. you can specify nodeId
as ${env:ENVIRONMENT}-${sequence:0:99:%02d}
, yielding names like Test-01
, Test-02
, …, QA-01
, QA-02
, …, Prod-01
, Prod-02
, …
Node state management
A midPoint node can be typically in one of the following states:
State | Characterization |
---|---|
up and alive |
Node regularly checks into the repository.
Its |
up, but not checking in |
There’s an issue with this node.
Its |
down |
Node’s |
starting |
Node’s |
deleted |
Node object no longer exists in the repository.
The deletion can occur either manually or by the Cleanup task.
The task deletes nodes that have |
Default parameter values:
Parameter | Where it is | Description | Default value |
---|---|---|---|
|
|
When to start considering node as not checked in. |
30 seconds |
|
|
When to start considering node as being down. |
900 seconds |
|
|
How often is the node aliveness check carried out. |
120 seconds |
|
|
When to start reporting node as starting too long. |
900 seconds |
|
cleanup policy e.g. in the system configuration object |
After what not-checked-in time should the node be deleted. |
none |