Operating System - HP-UX
1748171 Members
4170 Online
108758 Solutions
New Discussion юеВ

IP/name to follow package in SG?

 
SOLVED
Go to solution
chisle
Advisor

IP/name to follow package in SG?

How do I config an IP to walk with the package?

this is an IPV4 question...

For instance, if I have three packages in my cluster, on two nodes, and I want each package to be reached via separate IP, and I want that IP to be on whichever node the package is running...

pkg1:IP1:node1
pkg2:IP2:node1
pkg3:IP3:node2

then, if I move pkg2, I should have:
pkg1:IP1:node1
pkg2:IP2:node2
pkg3:IP3:node2

I'm guessing something about the package will set up an IP Alias (lan900:1, for instance)

I'm trying to figure out where this is set...

Been through the latest manual, but it eludes me...a pointer in the right direction would be nice/useful.

Thanks.
5 REPLIES 5
Mel Burslan
Honored Contributor

Re: IP/name to follow package in SG?

It is in your package control file, i.e.,

/etc/cmcluster//

if your cluster is set up with the usual settings (not a guarantee but 90% of the time it is so)

grep -e ^IP -e ^SUBNET

You should see the IP address(es) in the output

Hope this helps
________________________________
UNIX because I majored in cryptology...
Michael Steele_2
Honored Contributor

Re: IP/name to follow package in SG?

As mel explains above all of this is defined and configure in the package.cntl (* control *) template and file.

Just fill in the blanks.
Support Fatherhood - Stop Family Law
Matti_Kurkela
Honored Contributor

Re: IP/name to follow package in SG?

As others have mentioned, the package control script is the place - if you're using the legacy package configuration format.

If you're using the new (modular) package configuration format, then you must make sure the "package_ip" module is included, and use keywords "ip_subnet" and "ip_address" in your package configuration file.

If you're looking at the latest (18th) edition of "Managing Serviceguard", see page 298.

"Managing Serviceguard", 18th edition:
http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c02437444/c02437444.pdf

MK
MK
Bob_Vance
Esteemed Contributor
Solution

Re: IP/name to follow package in SG?

Naturally, you will make your application clients connect to the SG application Package virtual/floating IP ("PIP")-- that's the whole point of having it, of course.
Note, however, that there is no provision for a hostname for the PIP in SG.
This must be set up manually, external to SG.
It's not required, of course, to configure the application clients to use a hostname in lieu of hard IP, but it is usually preferred for convenience, and consistency.

Note: package PIP hostnames are *not* required by for SG operation among the SG nodes.

However, if you do want to use hostname resolution for the PIPs, then you will need to create a hostname (make up a name that relates to the application) for each new PIP and add it into your DNS, or much less conveniently, into the hosts files on the clients.
Usually, app admins want the PIP hostname to be like just "oracle" or "app1oracle".
SG admin may prefer the same name as the package. You could use aliases to accomodate both.
I like using something like "oracleSG" or Poracle" to make it clear that it is an SG package floating IP/name. In fact I usually name my packages with a leading "P" like "Poracle", "Pbanner", etc. and use the package name for the PIP hostname.
(Note: name resolution is *not* case-sensitive, unlike *Package* names, which *are* case-sensitive.)

In any case, of course, you must make sure that the names are not already used on your network for some other host's IP.



The above was relating to the Package IP/name.


For the hostnames of the *SG nodes* themselves, it is different:

IMPORTANT:
It is best practice to have all the SG nodes' hostnames in /etc/hosts.
You will also want to change the "hosts" resolution source order in /etc/nsswitch.conf on all the SG nodes to use "files" first, instead of DNS.

See chapter 5 in the appropriate Managing Service Guard manual for a more detailed discussion of name resolution.
http://h20000.www2.hp.com/bizsupport/TechSupport/DocumentIndex.jsp?lang=en&cc=us&taskId=101&prodClassId=10008&contentType=SupportManual&docIndexId=64255&prodTypeId=18964&prodSeriesId=4162060

bv
"The lyf so short, the craft so long to lerne." - Chaucer
chisle
Advisor

Re: IP/name to follow package in SG?

Thank you all for your coments. I have found the solution I required, and I've been able to move on, now.