1834814 Members
2479 Online
110070 Solutions
New Discussion

serviceguard

 
p7
Frequent Advisor

serviceguard

hi all,

we have an app that is keyed to hostnames, in a 2 node cluster if the primary node (hostA) fails over to its secondary node (hostB), does
the secondary node get the primary nodes hostname? in other words does the hostname also failover?

thx in advance

7 REPLIES 7
Denver Osborn
Honored Contributor

Re: serviceguard

You'd want to tie your app to the floating ip address so that when the package fails over, your users can still get to it. :)

to answer your question, no the hostname will not failover in the way you described.


hope this helps,
-denver
Steven E. Protter
Exalted Contributor

Re: serviceguard

hostname is unique to each host. The SG configuration refers to the hostname of the machine.

You can configure a floating IP address and a unqiue hostname for that ip address can be available on your network via /etc/hosts or DNS server.

Then no matter which node the application is running on the users just connect and don't really know the difference.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: serviceguard

No. Your clients need to connect to the package hostname rather than the actual hostname. This is fundamental to the operation of MC/SG. If you had 3 packages, each would get a hostname/IP address and your clients wouldn't care what the actual server was.
If it ain't broke, I can fix that.
Rita C Workman
Honored Contributor

Re: serviceguard

hostname of a server...belongs to the server, it doesn't failover.

We always point everything to resolve to the package name ! That way, it doesn't matter what server it is running on.
Even the Oracle desktop tnsnames uses the pkg name ... no IP...no hostname...just the package names. Works for local failover and even for when we failover to a different site !

Rgrds,
Rita
Kent Ostby
Honored Contributor

Re: serviceguard

You CAN assign a hostname to the floating IP address and then your users could use that no matter which system the package was running on .

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Stephen Doud
Honored Contributor

Re: serviceguard

Once in a while a customer them will try to outsmart the application- they change the hostname of the server after the package starts on it. However, changing the hostname after starting the package will break serviceguard commands.
Rita C Workman
Honored Contributor

Re: serviceguard

A way to get your application to run on either would be to use a variable instead of the hostname. Or....what about this:

We had a problem with the new Oracle GL. Seems it integrates the hostname when it loads the software....but we found they had an option to enter a "logical" name when you load up the software. We entered the package name...and voila, it will even failover now using the package name.

Just some food for thought,
Rita