Operating System - HP-UX
1755701 Members
4978 Online
108837 Solutions
New Discussion юеВ

SG - possible to change network configs with a script?

 
SOLVED
Go to solution
rvent
Frequent Advisor

SG - possible to change network configs with a script?

Hello,

I was wondering if i could have a script that gets executed every time the PKG changes nodes which will change the hosname of the active note to the hostname of the other node.?

EX: i have node1 and node2, node1 is active and node2 is the failover node. Node1 dies and the PKG is transfered to node2. Node2 is now active.

Is there any way to be able to change node2 hostname to node1 hostname when recieving the PKG..?

Thanks
7 REPLIES 7
Torsten.
Acclaimed Contributor

Re: SG - possible to change network configs with a script?

Why do you want to do this?

The package has its own IP address and an associated alias name. Using this name you will always get the server where the package is running.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Solution

Re: SG - possible to change network configs with a script?

No, that would break Serviceguard.

As already explained you should make sure everyting is tied to the virtual IP rather than the hostname of the system.

If you have software which is node-locked in some fashion you'll hve to take that up with the ISV. Refer to this section of the Serviceguard manual for more details:

http://docs.hp.com/en/B3936-90122/apcs03.html

HTH

Duncan

I am an HPE Employee
Accept or Kudo
rvent
Frequent Advisor

Re: SG - possible to change network configs with a script?

Here is the scenario:

At the moment we have node1 and node2 with one package. The package consists of all the data files needed to run the ERP app; the failover node works just fine, as we are able to move the package from node1 to node2 and vice-versa.

However, when we move the package to the failover node, the ERP system kicks into ├в demo mode├в after a few minutes of the PKG being moved. After digging around we found out that the licensing on the ERP checks for the hostname every 15min with random offset time; if the hostname doesn├в t match the one licensed it goes into ├в demo mode├в .

I have contacted the EPR software manufacturer and they have told me in several occasions that the application does not have any clustering support and that there are no plans to support it.

So I was wondering if there is any way that we could make something like a virtual hostname that gets moved alone with the package so that every time that ERP checks for the hostname it looks like it is running on the same node no matter which physical node is actually running it.

I don├в t want you to think that I am trying to violate any licensing terms since the app will only be running on one node at any given time, I am just trying to make it highly available.


Any ideas would be greatly appreciated.

Thanks
Torsten.
Acclaimed Contributor

Re: SG - possible to change network configs with a script?

You already asked this question last month, right?

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1197057

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
rvent
Frequent Advisor

Re: SG - possible to change network configs with a script?

Torsten, thanks for your input, but i was giving the reason of why would i want to run a script that would change the netowork config everytime the PKG is changed. Not asking the same question.. :) (however, it may sound like it since i did a copy and paste)

To clarify, this post was about executing a script to change the network config when the PKG is moved, which answer is no since it will break SG.

The previous post was about faking a hostname in the PKG. Which it may be possible, but it all depends on which function the application calls to get that information.

Thanks

Re: SG - possible to change network configs with a script?

You might want to run truss on the application component that checks the hostname. Thay will show you its system calls..

If they call uname(2) or gethostname(2) you have a problem, there's not much you can do about it. If they are daft enough to call system("/usr/bin/hostname") or do the check in a shell script you might be able to do something about it.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
rvent
Frequent Advisor

Re: SG - possible to change network configs with a script?

Yeah, i ve been reading that link you provided and it gives me what to look for.

I ll give it a shot and see what it comes up with.


Thanks