Cluster-Specific Keywords
Read this chapter for more information about cluster-specific keywords. These keywords decribe new usabilities for the ADAOPR utility command.
CLUSTER: Display Cluster Status
CLUSTER was introduced for Adabas utility ADAOPR to display cluster related information. For more information, see Health Check for Primary and Secondary Nodes > Cluster Status .
CLUSTER_PRIMARY_NODE: Trigger Primary Node Switch
ADAOPR ... CLUSTER_PRIMARY_NODE=<nodename>
Sample session output in case of success:
Display cluster status
adaopr dbid=11 disp=clu
%ADAOPR-I-STARTED, 12-APR-2022 15:25:36, Version 7.1.0.0 (Linux 64Bit)
Database 11, startup at 12-APR-2022 11:58:16
ADANUC Version 7.1.0.0, PID 15710
ADANUC Version 7.1.0.0
Database 11 Cluster on 12-APR-2022 15:25:36
Cluster UUID 0c9e6b65-ba47-11ec-8e1f-27fe15beadd5
view was last updated at sequence number 6
cluster is at sequence number 8
4 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE1 adatcp://susada2c:56010 SYNCED
NODE2 adatcp://susada2c:56011 SYNCED
NODE3 adatcp://susada2c:56012 SYNCED
NODE4 adatcp://susada2c:56013 SYNCED
Primary node: NODE3
Current node: NODE2
%ADAOPR-I-TERMINATED, 12-APR-2022 15:25:36, elapsed time: 00:00:00
Primary node switch (NODE3 --> NODE4)
adaopr dbid=12 cluster_primary_node=NODE4
%ADAOPR-I-STARTED, 12-APR-2022 15:26:04, Version 7.1.0.0 (Linux 64Bit)
Database 12, startup at 12-APR-2022 11:58:25
ADANUC Version 7.1.0.0, PID 15935
Cluster UUID 0c9e6b65-ba47-11ec-8e1f-27fe15beadd5
view was last updated at sequence number 6
cluster is at sequence number 8
4 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE1 adatcp://susada2c:56010 SYNCED
NODE2 adatcp://susada2c:56011 SYNCED
NODE3 adatcp://susada2c:56012 SYNCED
NODE4 adatcp://susada2c:56013 SYNCED
Primary node: NODE4
Current node: NODE3
%ADAOPR-I-TERMINATED, 12-APR-2022 15:26:04, elapsed time: 00:00:00
Display cluster status again
adaopr dbid=11 disp=clu
%ADAOPR-I-STARTED, 12-APR-2022 15:26:14, Version 7.1.0.0 (Linux 64Bit)
Database 11, startup at 12-APR-2022 11:58:16
ADANUC Version 7.1.0.0, PID 15710
ADANUC Version 7.1.0.0
Database 11 Cluster on 12-APR-2022 15:26:14
Cluster UUID 0c9e6b65-ba47-11ec-8e1f-27fe15beadd5
view was last updated at sequence number 6
cluster is at sequence number 9
4 Node(s) Primary component of the cluster
NAME ADATCP STATUS
---- ------ ------
NODE1 adatcp://susada2c:56010 SYNCED
NODE2 adatcp://susada2c:56011 SYNCED
NODE3 adatcp://susada2c:56012 SYNCED
NODE4 adatcp://susada2c:56013 SYNCED
Primary node: NODE4
Current node: NODE2
%ADAOPR-I-TERMINATED, 12-APR-2022 15:26:14, elapsed time: 00:00:00
The primary node switch does not terminate ongoing transactions. The nucleus will wait until the transaction will be closed by an ET, BT, or CL command or the transaction timer has expired. See the TT nucleus parameter for a complete description.
Note:
Primary node can only be changed by ADAOPR on primary, otherwise an error message will be returned.
adaopr dbid=12 cluster_primary_node=NODE1
%ADAOPR-I-STARTED, 12-APR-2022 16:19:34, Version 7.1.0.0 (Linux 64Bit)
Database 12, startup at 12-APR-2022 11:58:25
ADANUC Version 7.1.0.0, PID 15935
%ADAOPR-E-ADCWRND, Cluster primary can only be changed from existing primary node
%ADAOPR-I-ABORTED, 12-APR-2022 16:19:34, elapsed time: 00:00:00
What about existing client sessions
Existing client sessions that don't have any transactions running are closed by a primary node switch immediately and are not transferred to the new primary node. If the client session has an open transaction, the transaction can be continued until one of the ET, BT, or CL commands terminates it or the transaction timer expires.
The next command (except the CL command) will receive a nucleus response 9 with ST in the additions 2 field indicating the end of the former session. A CL command must be issued in order to release client allocated resources.
What about new client sessions
A new client session will be delayed until the node switch is finished. The new session will be routed to the new primary node automatically.
Related concepts
Cluster 101