Operating System - HP-UX
1832929 Members
2523 Online
110048 Solutions
New Discussion

Re: Send Message to everyone..that cluster package is switching

 
SOLVED
Go to solution
boomer_2
Super Advisor

Send Message to everyone..that cluster package is switching

hi guys,
We have 2node cluster..i just would like to send a message to all logged in users on adoptive node ,that the cluster package has halted and switching to node 2 and so please log off immediately...Bcoz here we r using the adoptive node as development server ..since our company is in a deep financial crunch....Please suggest...
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Send Message to everyone..that cluster package is switching

Shalom,

http://www.hpux.ws/mailfile2

Take code from there and build it into your script.

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
boomer_2
Super Advisor

Re: Send Message to everyone..that cluster package is switching

Hi Steven,
I am not very good in scripting...but i would like to know when my package goes down on node1,which process should i grep for ,to verify and then send a message to all logged in users of adoptive node...to log off immediately since that node would be my producn node ..

Regards,
Boomer
Matti_Kurkela
Honored Contributor
Solution

Re: Send Message to everyone..that cluster package is switching

You could send the message in the package control script, as part of the package halt actions... but if the package halt is happening because the system has lost connectivity, you may not get the message sent out of the failing node.

If the production node crashes, the shutdown actions are not done at all: the package is just started up on the adoptive node with the hopes that the fsck will clean up any filesystem problems the crash may have caused, and that the application can handle its own problems.

Would the beginning of the package startup on the adoptive node be a good place for sending the message? After all, it's the only thing that is guaranteed to execute, no matter why the package is being switched.

Something like this could be added into the package startup actions part of the package control script:

wall << EOF

ATTENTION: production system now starting up on this host.
All non-production users please log off *immediately*.

EOF

You might also want to increase the package filesystem mount and umount retry counts in the control script, if they are at the default values: this will ensure that if some developer has something hogging the production package's mount point, that process will be killed automatically and the mount will be retried. I've found 3 to be a good retry count value for both.

Remember that the package control script is not automatically replicated between the nodes: you must do that yourself.
MK
boomer_2
Super Advisor

Re: Send Message to everyone..that cluster package is switching

Hi Matti,
Thanks for ur suggestion...i will be putting the same entry that u have mentioned in the package starup section....
Points given....