UnixPedia : HPUX / LINUX / SOLARIS: serviceguard
Showing posts with label serviceguard. Show all posts
Showing posts with label serviceguard. Show all posts

Sunday, January 11, 2015

MC/ServiceGuard: How to Disable the IP Monitoring on Running Cluster

For issue :
During switch port maintenance activity when lan1 failed it was getting failed over to lan16 automatically but the vice-versa was not possible. We had to switch from lan16 to lan1 automatically.

 the lan1 should failover to lan16 and vice versa.
Looking into the cmgetconf output  could see that the lan1’s standby interface is lan16.
 lan1 as primary and lan16 as primary.

NODE_NAME               tdsxdbp03
  NETWORK_INTERFACE     lan1
    HEARTBEAT_IP        172.98.212.10
  NETWORK_INTERFACE     lan8
    HEARTBEAT_IP        192.168.112.140
  NETWORK_INTERFACE     lan0
    HEARTBEAT_IP        172.98.213.10
  NETWORK_INTERFACE     lan16
#  CLUSTER_LOCK_LUN
  FIRST_CLUSTER_LOCK_PV /dev/disk/disk5
# Primary Network Interfaces on Bridged Net 1: lan1.
#   Possible standby Network Interfaces on Bridged Net 1: lan16.
# Primary Network Interfaces on Bridged Net 2: lan8.
#   Warning: There are no standby network interfaces on bridged net 2.
# Primary Network Interfaces on Bridged Net 3: lan0.
#   Warning: There are no standby network interfaces on bridged net 3.

Also the network failback is enabled in the configuration.

# NETWORK_AUTO_FAILBACK
# When set to YES a recovery of the primary LAN interface will cause failback
# from the standby LAN interface to the primary.
# When set to NO a recovery of the primary LAN interface will do nothing and
# the standby LAN interface will continue to be used until cmmodnet -e lanX
# is issued for the primary LAN interface.

NETWORK_AUTO_FAILBACK           YES

I could see the following message in the syslog.log for the switch migration activity. It clearly visible that the lan1 is successfully moving the lan16 upon the failover.
However what I can  see that both lans are failed at IP layer.

Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: 172.98.212.10 failed.
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: lan1 is down at the IP layer.
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: lan1 failed.
Jan 10 05:28:00 tdsxdbp03 su: + tty?? root-sentrigo
Jan 10 05:28:20 tdsxdbp03  above message repeats 3 times
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: lan1 switching to lan16              ? Switching to standby network
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 switching from lan1 to lan16
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 switched from lan1 to lan16
Jan 10 05:28:20 tdsxdbp03 cmnetd[27697]: lan1 switched to lan16
Jan 10 05:28:28 tdsxdbp03 cmnetd[27697]: 172.98.212.10 failed.
Jan 10 05:28:28 tdsxdbp03 cmnetd[27697]: lan16 is down at the IP layer.
Jan 10 05:28:28 tdsxdbp03 cmnetd[27697]: lan16 failed.
Jan 10 05:28:28 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 down
Jan 10 05:28:40 tdsxdbp03 cimserver[25010]: PGS10405: Failed to deliver an indication: PGS08001: CIM HTTP or HTTPS connector cannot connect to 10.36.218.66:50004. Connection failed.
Jan 10 05:28:40 tdsxdbp03 cimserver[25010]: PGS10405: Failed to deliver an indication: PGS08001: CIM HTTP or HTTPS connector cannot connect to 10.36.218.67:50004. Connection failed.
Jan 10 05:28:40 tdsxdbp03 cimserver[25010]: PGS10405: Failed to deliver an indication: PGS08001: CIM HTTP or HTTPS connector cannot connect to 10.36.152.168:50004. Connection failed.
Jan 10 05:28:50 tdsxdbp03 cmnetd[27697]: 172.98.212.10 recovered.
Jan 10 05:28:50 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 up
Jan 10 05:28:40 tdsxdbp03 cimserver[25010]: PGS10405: Failed to deliver an indication: PGS08001: CIM HTTP or HTTPS connector cannot connect to 10.36.218.66:50004. Connection failed.
Jan 10 05:28:50 tdsxdbp03 cmnetd[27697]: lan16 is up at the IP layer.
Jan 10 05:28:40 tdsxdbp03 cimserver[25010]: PGS10405: Failed to deliver an indication: PGS08001: CIM HTTP or HTTPS connector cannot connect to 10.36.152.168:50004. Connection failed.
Jan 10 05:28:50 tdsxdbp03 cmnetd[27697]: lan16 recovered.
Jan 10 05:29:00 tdsxdbp03 su: + tty?? root-conclusr

Jan 10 06:20:52 tdsxdbp03 cmnetd[27697]: 172.98.212.10 failed.
Jan 10 06:20:21 tdsxdbp03 su: + tty?? root-conclusr
Jan 10 06:20:52 tdsxdbp03 cmnetd[27697]: lan16 is down at the IP layer.
Jan 10 06:20:52 tdsxdbp03 cmnetd[27697]: lan16 failed.
Jan 10 06:20:52 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 down
Jan 10 06:21:00 tdsxdbp03 su: + tty?? root-sentrigo
Jan 10 06:21:02 tdsxdbp03 cmnetd[27697]: 172.98.212.10 recovered.
Jan 10 06:21:02 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 up
Jan 10 06:21:02 tdsxdbp03 cmnetd[27697]: lan16 is up at the IP layer.
Jan 10 06:21:02 tdsxdbp03 cmnetd[27697]: lan16 recovered.

Here is the the logs that customer is tried to enable the lan card manually. And it was successful.
Jan 10 12:27:30 tdsxdbp03 syslog: cmmodnet -e lan1
Jan 10 12:27:30 tdsxdbp03 cmnetd[27697]: Request to enable interface lan1
Jan 10 12:27:14 tdsxdbp03 su: + tty?? root-conclusr
Jan 10 12:27:30 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 switching from lan16 to lan1
Jan 10 12:27:30 tdsxdbp03 cmnetd[27697]: Subnet 172.98.212.0 switched from lan16 to lan1
Jan 10 12:27:30 tdsxdbp03 cmnetd[27697]: lan16 switched to lan1

This issue due to the IP MONITOR enabled for subnet 172.98.212.0 , that is reason we are seeing the LAN failed at IP Layer message is showing in syslog.

SUBNET 172.98.212.0
  IP_MONITOR ON
  POLLING_TARGET 172.98.212.1

SUBNET 192.168.112.0
  IP_MONITOR OFF

SUBNET 172.98.213.0
  IP_MONITOR OFF

Let me explain why the LAN failover was not worked  lan16 to lan1 .When IP Monitor is configured we can choose Target Polling method of Peer Polling method.  In either method, using Internet Control Message Protocol (ICMP) and ICMPv6, IP Monitor sends polling messages (ECHO msgs) to target IP addresses and verifies that responses are received. When the IP Monitor detects a failure, it marks the network interface down at the IP level.

If a PRI and STBY cards are configured, and we are using IP Monitor on the IP address configured on the PRI (to start with) then when such a failure takes place and the lan inerface is marked on the IP level, the IP address is moved to the STBY card. By nature of the IP Monitor design, the pings (or the sending of those ECHO msgs) are now being sent by the IP address on the STBY card.

If then the cause of the failure is fixed, there is no way for Serviceguard to failback the IP from STBY to the PRI. This is because there is no IP address on the PRI to do the ping and verify the replies, to know that all is OK. So even when the problem is resolved, the IP address remains on the STBY card.

Now, if the failure continued then even when the IP address moves to the STBY it will not be able to verify the pings, and the STBY card will be marked down on the IP level, and subnet will go down. However, the IP address will NOT be removed with the STBY (there is nowhere else to place it, and also since we are now down anyway, we keep it there to check for possible replies). So if the cause is now fixed, and the reply to the ECHO msgs are verified, then the subnet is returned to the STBY card, as the IP is configured there.

So solution for this issue is to disable the IP monitor for Subnet 172.98.212.0 . so that SG will not mark the Primary interface in down state.

 Issue Setup



MC/Service Guard Version : A.11.19.00
IP Monitoring was configured on the existing cluster.
SUBNET 172.17.1.0
IP_MONITOR ON
POLLING_TARGET 172.17.1.3
How to disable the IP Monitoring and can it be done Online while cluster is running?

Solution


IP Monitoring can be disabled Online while cluster is running.
Can be changed while the cluster is running; must be removed, with its accompanying IP_MONITOR and POLLING_TARGET entries, if the subnet in question is removed from the cluster configuration.
IP Monitor
Can be changed while the cluster is running; must be removed if the preceding SUBNET entry is removed.
POLLING_TARGET
Can be changed while the cluster is running; must be removed if the preceding SUBNET entry is removed.
To Temporarily disable the IP Subnet monitoring from the cluster configuration, Modify the cluster ascii file like below and check/apply the configuration:
SUBNET 172.17.1.0
IP_MONITOR OFF
# POLLING_TARGET 172.17.1.3
NOTE:POLLING_TARGET 172.17.1.3 entry should be removed/commented when we are making the IP_MONITOR OFF.
To Permanently remove the IP Subnet monitoring from the cluster configuration, remove the following entries from the cluster ascii file and check/apply the configuration:
#SUBNET 172.17.1.0
# IP_MONITOR ON
# POLLING_TARGET 172.17.1.3
Steps:
  1. Get the running cluster configuration file using cmgetconf file:
       #cmgetconf /etc/cmcluster/<clustername_date>.ascii
  2. Modify the /etc/cmcluster/<clustername_date>.ascii file depending on the requirement as mentioned above.
  3. Run cmcheckconf to check any errors:
      #cmcheckconf -v -C /etc/cmcluster/<clustername_date>.ascii
  4. If no errors on cmcheckconf then run cmapplyconf:
      #cmapplyconf -v -C /etc/cmcluster/<clustername_date>.ascii
NOTE:When disabling/deleting the IP Subnet you will get below messages with cmcheckconf and cmapplyconf.
Setting IP_MONITOR to OFF for SUBNET 172.17.1.0 while cluster is running.
Removing POLLING_TARGET 172.17.1.3 from SUBNET 172.17.1.0 while cluster is running.
-----------------

Tuesday, December 30, 2014

HP-UX 11i Availability and Clustering - What are the Differences Between cmruncl, cmruncl -n, and cmrunnode Commands?



HP-UX 11i Availability and Clustering - What are the Differences Between cmruncl, cmruncl -n, and cmrunnode Commands?

Information

HP-UX 11i, ServiceGuard, all versions.
Confused between the commands that can result in cluster starting and how to use them. Those commands are cmruncl, cmruncl using the -n option, and cmrunnode.
What are the differences between them and when are they used, and what are the different results of using each of those commands?

Details

Each of the commands cmruncl and cmrunnode starts the cluster daemon on one or more nodes. When each is used depends on the status of 1 or more nodes. The end result depends on how each command is used, on one or more nodes in the cluster. If the total number of nodes defined in the cluster is M, then the following holds true:
A. # cmrunnode -v
This command basically sends a request across the network and continues to try for 10 minutes (default value of this configurable timeout) looking for the cluster to which it belongs and its status by analyzing signals from other member nodes:
·         If the cluster is found to be running on one or more other nodes configured in its cluster, the request is interpreted as a request permission to join the cluster, and if all is OK, it is given permission and joins the cluster.
·         If ALL nodes in the cluster are executing the cmrunnode command at a given point in time, then it is decided that the cluster must be down on all nodes which means the cluster is not running anywhere (otherwise it has to be up at least on one of the member nodes, and that node cannot be executing cmrunnode to join a cluster). In that case, since all nodes are attempting to "join the cluster," it is decided to form a cluster from scratch on all nodes.
·         If N nodes, where 0 < N < M, are found to be executing the cmrunnode command at a given point in time, then unless the cluster is already running on a set of K other nodes, where 0 < K =< M-N, then each of the N nodes will give up 10 minutes after it started its cmrunnode. Another way to see this is that a cluster cannot be started on the N nodes from scratch (i.e., the cluster was not running on any subset of its M member nodes and attempted to start it on some subset or 1 or more nodes) by running the cmrunnode command on N nodes where N < M. The only way the cluster can be started from scratch using the cmrunnode command is, as described in the point 2 above, when the cluster is down everywhere and all M nodes are executing the cmrunnode at a given point in time.
This design is intended to safeguard against the "split brain syndrome" where the same cluster is simultaneously running on 2 subsets of the M nodes, which can lead to data corruption since the same packages are started on both subsets or "both clusters" and so more than one node can be writing to the same file system simultaneously, leading to data corruption.
Since the number 1 priority in High Availability system design is "data integrity", the above is made in line with that philosophy. Take for example, if it has an 8-node cluster that is running, and it reboots 7 of the nodes around the same time, where they hit the startup script of ServiceGuard, which is enabled to execute the cmrunnode automatically, within 10 minutes of each other.
The reboot action on the 7 nodes will lead to the cluster being reformed on the 8th node where it continues to run, and all (or some) of the packages will failover to that node. If the 7 nodes are able to reach the 8th node on the network, then they will start to join the cluster one by one and all is OK. However, suppose that right after rebooting the 7 nodes and before they hit the startup script, node8 became isolated network-wise. This may lead to some packages to go down (if they are monitoring the network). However, it is possible that some packages are either NOT monitoring subnet(s) (such as if those packages are not dependent on the subnet(s)). In this case, when the 7 nodes execute the cmrunnode, none of them will find node 8, and so no joining takes place. In this case, all 7 nodes will only find each other, but since they cannot find node 8, they cannot form the cluster on themselves according to the above rules. This is very helpful in this case, since if it is allowed to give up on node8 after some period of time and to form the cluster on themselves, it will end up having the cluster in a "split brain" since it will simultaneously be running on node8 as a cluster and also will be running separately on the other 7 nodes. This will lead to those packages that do not depend on the networks to run on both node8 as well as one of the nodes 1 though 7. This will lead to data corruption of those packages in any writing to file systems, which will simultaneously be mounted on both of those nodes running the package.
B. # cmruncl
This command is executable on any of the M nodes in the cluster. Once it is executed on one of them, it goes out on the network and attempts to start the cluster daemon on each of the M nodes to form a cluster on all of them. If the cluster fails to start on even just one of the M nodes, for any of the many possible reasons (such as the cluster is already running on one or more of the nodes, or one node is not reachable on the network, … etc), it will fail to start at all.
This command has one purpose only, which is to start the cluster from scratch on all M nodes. It will either succeed or will fail; there are no middle grounds.
C. # cmruncl -n <node_1_name> -n <node_2_name> ...... -n<node_N_name>
where 0 < N < M
The purpose of the above command is if the cluster is down on all M nodes, and for some reason would like to start the cluster on a subset N of the M nodes, the above command is executed. This command is followed by a confirmation question to make sure the user is aware of what the user is doing. If answered affirmatively, the action is taken; if not, the command is cancelled.
If it happens to be that the cluster is already running on another subset K of the M nodes, where 0 < K < M – N + 1, and where no member in K is a member of N, and the user answers the question affirmatively, the action is taken which results in a "split brain syndrome", where two versions of the cluster are running simultaneously on the subset N and the subnet K. This results in starting packages on both versions, and therefore, can lead to data corruption.
The user is cautioned strongly here to ensure that the cluster is NOT running on any such subset K before answering the question affirmatively to avoid such problems.

 

Monday, June 9, 2014

HPUX : How to configure Quorum server for the cluster



How to configure Quorum server for the cluster :.
Overview
How to configure Quorum server for the cluster : Quorum server is used as tiebreaker in serviceguard set-up . To avoid split-brain-syndrome.
Procedures

                1.Choose a node or nodes that are not part of this cluster. The nodes can be running either HP-UX or Linux.


                2.Install the Quorum Server software (B8467BA version A.02.00):


                3.Either from the HP Serviceguard Distributed Components CD, or Download the product for free from http://software.hp.com, under
                "High Availability." The last time I looked,
                it was titled "Serviceguard Quorum Server." Use the appropriate tool, i.e., swinstall or rpm to install the product

                3. Put the entry in  /etc/inittab gets started at boot-up time and gets restarted (the respawn action in /etc/inittab) if necessary.
                The entry should look something like this:

                                qs:345:respawn:/usr/lbin/qs >> /var/adm/qs/qs.log 2>&1
                               
                4.Now we can start the qs daemon by running init q
                5.Check that the qs daemon is running by monitoring the file /var/adm/qs/qs.log

Keywords.
Cluster ,quorum, init.

Tuesday, June 3, 2014

HPUX : PACKAGE EXECUTION STEPS IN SG

During Run Script Execution
Once the package manager has determined that the package can start on a particular node, it
launches the script that starts the package (that is, a package’s control script or master control
script is executed with the start parameter). This script carries out the following steps:
1. Executes any external_pre_scripts
2. Activates volume groups or disk groups.
3. Mounts file systems.
4. Assigns package IP addresses to the NIC on the node (failover packages only).
5. Executes any customer-defined run commands (legacy packages only
6. Starts each package service.
7. Starts up any EMS (Event Monitoring Service) resources needed by the package that were
specially marked for deferred startup.
8. Exits with an exit code of zero (0).



 During Halt Script Execution
Once the package manager has detected the failure of a service or package that a failover package
depends on, or when the cmhaltpkg command has been issued for a particular package, the
package manager launches the halt script. That is, a package’s control script or master control
script is executed with the stop parameter.



1. Halts any deferred resources that had been started earlier.
2. Halts all package services.
3. Executes any customer-defined halt commands (legacy packages only) or external_scripts.
4. Removes package IP addresses from the NIC on the node.
5. Unmounts file systems.
6. Deactivates volume groups.
7. Exits with an exit code of zero (0).
8. Executes any external_pre_scripts