Operating System - HP-UX
1847803 Members
3871 Online
104021 Solutions
New Discussion

Re: Package Maintenance Mode

 
SOLVED
Go to solution
Karthik S S
Honored Contributor

Package Maintenance Mode

Hi,

How do we start a cluster package in maintenance mode? What is the relevance of this?? What is the OB2SGENABLED parameter used for?

One of our customer was asking me this and I dont have any further info about the same ...!!!

Pl. help.

Thanks,
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
8 REPLIES 8
melvyn burnard
Honored Contributor
Solution

Re: Package Maintenance Mode

Firstly, the parameter you quote is not a standard SG paameter. I would hazard a guess, and say it may have something to do with a package written for OmniBack (Omni Back II ServiceGuard enabled ??).

As to package Maintenance Mode, this is a method of having your package startup script test for the existence of a file, and if the file exists, then it just loops around sleeping, or skips the application startup.
This means that you have your vg/lv/fs activated and mounted to allow you to do any maintenance, without the application actually running.

If the file is not there, the package starts as normal.

This is covered in a course that may be available, namely the Serviceguard II (3 day advanced) course from HP Customer Education.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
G. Vrijhoeven
Honored Contributor

Re: Package Maintenance Mode

Karthik,

I would hash out the custome_defined_run_cmds. This way only the disk get mounted and the ip-address is activated. I do not know the OB2SGENABELED parameter. Is it a new parameter?

HTH,

Gideon
Karthik S S
Honored Contributor

Re: Package Maintenance Mode

Hi Melvyn,

Does the SG Toolkit scripts contain a option for starting the package in maintenance mode?? If so do I have to pass any switches to the cmrunpkg command or just create a file by name debug under the package directory?

Thanks,
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: Package Maintenance Mode

Thank you Vrijhoeven for the Info.
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
melvyn burnard
Honored Contributor

Re: Package Maintenance Mode

The standard SG scripts do not supply anything for this. These are normally "home-grown " or come with certain specific toolkits, such as the Serviceguard Extension for SAP.

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
melvyn burnard
Honored Contributor

Re: Package Maintenance Mode

Here is a simple idea:

while true
do
if
[ -f /etc/cmcluster/pkgA/maint_flag ]
then
while [ -f /etc/cmcluster/pkgA/maint_flag ]
do
sleep 10
done

else
start_my_application
fi
done
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Sundar_7
Honored Contributor

Re: Package Maintenance Mode

If all that u want is to have the VGs mounted and virtual IP address enabled then why to fiddle with the package control script.

If the cmcld is running in the node, why not just activate the vg in exclusive mode ,mount the logical volumes manually and add the IP address using cmmodnet ?
Learn What to do ,How to do and more importantly When to do ?
Sridhar Bhaskarla
Honored Contributor

Re: Package Maintenance Mode

Hi Karthik,

There is nothing called package maintenance mode by default with serviceguard. However, I implement a 'lockfile' mechanism on my servers. If the file exists, then the application won't start. A simple chronology is as follows. My scripts have start|stop|monitor cases. I define functions like appstart, appstop and appmon inside the script.

1. Start

Check for /etc/cmcluster/.lock. If it exists, run the function appstart. Else simply exit with exit 0.

2. Stop

Doesn't care for this lock file for most of my requirements. Simply runs appstop.

3. Monitor:

This is an important piece. If the lock file is there, then it will skip the monitoring part of the processes. If the lock file is not there, then it will see if all the processes|required packages are up or not and start them. It also keeps a counter for each operation. If the counter exceed beyond a certain value, then the script will abort. Without this counter, monitor may end up restarting the applicaiton numerous times.

If I have to do maintenance, I simply touch /etc/cmcluster/.lock file and start the package. Once I am done, I remove the file and the monitor will automatically kick in the appstart function to start the application. It's fun to write those scripts though but you will need to do a lot of error handling.

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