This post is also available in: Português
In this article, I will show how to detect to which Hub Node is your Leaf Node connected to in an Oracle Flex Cluster scenario where you have multiple Hub Servers.
First of all, let's check our current scenario:
[oracle@oranode3 ~]$ crsctl get node role status -all Node 'oranode1' active role is 'hub' Node 'oranode2' active role is 'hub' Node 'oranode3' active role is 'leaf'
So in my current configuration I have 2 Hub Nodes (oranode1 and oranode2) but only 1 Leaf Node (oranode3).
To check to which of those 2 Hub Nodes is my Leaf Node connected, I need to check on ocssdrim.trc file to which node is my leaf periodically pinging and checking availability:
[oracle@oranode3 ~]$ export GRID_BASE=/u01/app/grid [oracle@oranode3 ~]$ cat $GRID_BASE/diag/crs/$(hostname -s)/crs/trace/ocssdrim.trc | grep 'Sending a ping msg to' | tail -1 2017-03-10 13:57:32.916716 : CSSD:3347568384: clssbnmc_PeriodicPing_CB: Sending a ping msg to host oranode1, number 1, using handle (0x2525390) last msg to hub at 70720064, connection timeout at 70750064, current time 70722514
So by the message above, the oranode3 is periodically sending pings to oranode1, meaning this is the node to which it is connected.
What happens when a Hub Node ceases to be a part of the cluster? In such scenario, the Leaf Nodes associated with that Hub Node will failover to one of the surviving nodes in the cluster.
Let's try that. On oranode1:
[root@oranode1 ~]# crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oranode1' CRS-2673: Attempting to stop 'ora.crsd' on 'oranode1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oranode1' (...) CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oranode1' has completed CRS-4133: Oracle High Availability Services has been stopped.
Now back on oranode3 let's check for any destroyed connection:
[oracle@oranode3 ~]$ cat $GRID_BASE/diag/crs/$(hostname -s)/crs/trace/ocssdrim.trc | grep 'Destroying connection' | tail -1 2017-03-10 14:02:02.932005 : CSSD:3347568384: clssbnmConnDestroy: Destroying connection object (0x7f1ab4034310) for host oranode1
And the new connection is estabelished to:
[oracle@oranode3 ~]$ cat $GRID_BASE/diag/crs/$(hostname -s)/crs/trace/ocssdrim.trc | grep 'Sending a ping msg to' | tail -1 2017-03-10 14:04:34.377566 : CSSD:3347568384: clssbnmc_PeriodicPing_CB: Sending a ping msg to host oranode2, number 2, using handle (0x1f83750) last msg to hub at 71141124, connection timeout at 71171124, current time 71143974
As expected, oranode2, the only survived Hub Node.
References:
Have you enjoyed? Please leave a comment or give a 👍!