Operating System - HP-UX
1833053 Members
2660 Online
110049 Solutions
New Discussion

Re: IP Adress assignment to package

 
R.J. van der Zwart
New Member

IP Adress assignment to package

We've got 3 packages on one ServiceGaurd clusternode. The problem is the IP assignment. I will happen that the cluster assigns a different IP adress to a package than that is configured in the configuration file.

So next situation:

Package IP adress:

A 199.78.0.10
B 199.78.0.12
C 199.78.0.14

What happens is the following (i.e.):

Package IP adress:

A 199.78.0.14
B 199.78.0.12
C 199.78.0.10

Has anybody ever experienced this??
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: IP Adress assignment to package

Hi,

The IP is specified in the control file of the package. If IP1 is specified for Package1, then it is not possible for Package2 to try to bring up IP1 unless it is mistakenly configured in the control file of package2.

Once all the packages are up and running, you can see all the IPs up.

To find out the correct IP address brought up by the package, look at the package control log file under /etc/cmcluster/package/ directory. Search for the string "Adding IP Address" or "Remove IP Address".

By the way, how did you come to conclusion that the package is getting a different IP than is configured?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
fg_1
Trusted Contributor

Re: IP Adress assignment to package

RJ

Please post a copy of the package configuration files for each package. This may help in giving everyone a clue as to where the problem is.
Uday_S_Ankolekar
Honored Contributor

Re: IP Adress assignment to package

There are many ways to determine the relocatable IP used in a package control
script.

First find the package control script using the following syntax
cmgetconf -p | grep ^RUN_SCRIPT | awk '{print $2}'

using the package control script path obtained from above, say
grep ^IP
OR

grep ^IP | cut -d " " -f 2

OR

grep ^IP
OR

sed -n 's/^IP\[.\][=\"]*\([0-9].*[0-9]\).*/\1/p'
OR

-- using the package log file, say grep ": Adding IP address " | cut -d " " -f 10 | sort -u

OR


grep ": Adding IP address " awk '{print $10}' | sort -u

OR

grep ": Adding IP address " | awk '{print $(NF-3)}' | sort -u

OR

-- using the syslog.log file and name of the package, say
egrep "CM-\[[0-9]+\]: cmmodnet -a" | cut -d " " -f 9 | sort -u

OR

egrep "CM-\[[0-9]+\]: cmmodnet -a" | awk '{print $9}' | sort -u

OR

egrep "CM-\[[0-9]+\]: cmmodnet -a" | awk '{print $(NF-1)}' | sort -u

OR

-- using the netstat command
netstat -in | grep : | awk '{print $4}'

Reference : Doc Id: KBQA00000185

Goodluck,
-USA..
Good Luck..
R.J. van der Zwart
New Member

Re: IP Adress assignment to package

I agree with your story, it should not happen but it does.

I must say this is an 1 node test cluster, but it should not make a difference. It has one LAN card lan1 and offcourse not a lan0 dedicated heartbeat lan because there's only one node.

We have also a 5 node cluster with the same configuration and there is no problem at all. The IP is assigned to the package which is configured in the /etc/cmcluster/package/ file.

We have now a workaround and that is to only start one package, which than gets the correct IP adress, package A. And start the applications in package B and C by hand.

But when we start all the packages via the cluster package A does not get the IP adress which has been configured in the configuration file. It seems that which package startup first get the IP adress of package A.

Very very strange indeed, how can a package get an IP-adress from a other configuration file?

I must also mention that IP aliases (virtual IP adresses, like lan1:1, lan1:2 and so on). I have no idea where this is configured??
Tim D Fulford
Honored Contributor

Re: IP Adress assignment to package

Hi

Ok I've seen something similar to this before but each package had the correct IP address it just behaved in a weird way:

What was happening was sort of two fold
-1- The subnet in in the various cluster files did NOT correctly match the subnet of the machines lan interface. e.g
# netstat -in
lan0 172.19.23.0 172.19.23.1 - machine
lan0:1 172.19.0.0 172.19.23.2 - package

Note lan0 has a class B netmask & lan0:1 has a class C netmask

-2- SG did not correctly deconfigure a failed network interface (probably because of the above). This left lan0:1 plumbed in with no IP!

The netmask problem is easy to miss & the cluster can work fine 'till failovers start. So check all your machines /etc/rc.config.d/netconf files & /etc/cmcluster/*/*

Tim
-
melvyn burnard
Honored Contributor

Re: IP Adress assignment to package

what do the package logs show?
In there you will see what IP address each package is trying to add to which subnet, and this should also be in the syslog.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!