Operating System - HP-UX
1833831 Members
2335 Online
110063 Solutions
New Discussion

How can I control the order in which the packages stop when running â cmhaltcf â

 
SOLVED
Go to solution
Rui Vilao
Regular Advisor

How can I control the order in which the packages stop when running â cmhaltcf â

Greetings,


In order to stop my cluster in a more graceful order I would like to stop packages in a pre-defined order. Package APP1 runs a database, therefore I would like to stop at last:

# cmhaltcl -f
Disabling package switching to all nodes being halted.
Warning: Do not modify or enable packages until the halt operation is completed.

Halting Package DB
Halting Package APP1
Halting Package APP2

Any help/suggestion is highly appreciated.

Thanks in advance for your help,

Kind Regards,

Rui Vilao
"We should never stop learning"_________ rui.vilao@rocketmail.com
8 REPLIES 8
RAC_1
Honored Contributor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

When cmhaltcl -f is executed you can not control package shutdown order. They are shutdown simultanously.

You should be using cmhaltpkg -p "package you want" -v
starting with package you want to shutdown first.

There is no substitute to HARDWORK
Rita C Workman
Honored Contributor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

If you only have 3, have you considered just stopping the packages individually (cmhaltpkg) in the order you want, and then stopping your cluster....

Just a thought,
Rita
Rui Vilao
Regular Advisor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

Hi RAC & Rita.

Well, I am writing a shutdown procedure for the customer... If I could use cmhaltcl -f it would be nicer that stopping every package individually...

RAC: Packages are stopped sequentially, not simultaneously.

Many thanks.

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
RAC_1
Honored Contributor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

Rui,

When cmhaltcl -f is executed it is forceful shutdown. Bear in mind that the packages may be running on different nodes. Then the cmhaltpkg is executed on another node. That is the packages are halted simultanously.

I would rather prefer using cmhaltpkg. (I can control the shutdown order)

There is no substitute to HARDWORK
John Dvorchak
Honored Contributor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

You could just script it:

#!/usr/bin/ksh


cmhaltpkg pkg3
cmhaltpkg pkg2
cmhaltpkg pkg1
cmhaltpkg pkg_app

cmhaltcl -f
If it has wheels or a skirt, you can't afford it.
Pramod_4
Trusted Contributor
Solution

Re: How can I control the order in which the packages stop when running â cmhaltcf â

Package shutdown in SG cluster is completed in sequence.

Packages with the lower package ID will be shutdown first, then other packages in ascending order.

Use cmviewconf to find out the package ID for the packages. You can drop and add the packages to make then in the order you want.

Other way around is, put "cmhaltpkg APP2" in the customer defined halt command section as a first step in APP1's control script. I have tested both methods and both works fine.

Regards,
Pramod

Hamdy Al-Sebaey
Regular Advisor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

Rui,

As you see in the above answers, you can'nt controle the package if you use cmhaltcl, so to controle this just stop the package with cmhaltpkg, at the same time you can controle the package controle log file.
I do'nt prefer to you use option (-f) when I stop the cluster,sometimes (saw it my self with version 11.12) the cluster configuration ascii file was coruppt.
Regards,
Hamdy
Thanks for sharing knowledge
Rui Vilao
Regular Advisor

Re: How can I control the order in which the packages stop when running â cmhaltcf â

Hi,

Special thanks to Pramod.
Your were right.

The order in wich the packages are added to the cluster is the order in which they
will stop when running "cmhaltcl -f"

Cheers,

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com