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

Re: MCSG-to start second package depending on main package

 
Mahadev Pednekar
Frequent Advisor

MCSG-to start second package depending on main package

Hi,
I have two rp3440 with o/s 11.11 and MCSG 11.16. I have configured MCSG with two packages, first package is main and contains filesystem and oracle startup/shutdown and has auto-switching enabled, the second package is manual and has to start only after first package is started. Presently I am achivieng this by making second package manual i.e I have to start second package once main package is started. I want to know is there any way to make this process automatic so that second package will start automatically once main package is started.

regds,
MP
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: MCSG-to start second package depending on main package

Hi,

We are also having similar setup but with both packages set to automatic startup alongwith cluster formation. This is achived by defining a delay in the second package to check for the condition that the first package has been started & to start second package only when the condition is met.

HTH,
Devender

Impossible itself mentions "I m possible"
Mahadev Pednekar
Frequent Advisor

Re: MCSG-to start second package depending on main package

Hi Devender,
Can you specify the delay parameter that I have to modify in second package ? If possible attach the relevant parameter of package.

regds,
MP
Ralph Grothe
Honored Contributor

Re: MCSG-to start second package depending on main package

I was forced into a similar (ugly) hack with one of our clusters where the application is so skewed that it requires a certain startup and shutdown sequence of interrelated packages.
You can achieve an automatism quite simple by scripting a mere idling loop wherein the control flow is held back until the parsing of the output from "cmviewcl -p certain_package" is such that its status and state fields display "up" and "running".
But as my phrasing "ugly hack" suggests
I deprecate this as breaching SG logic.
I think if such interralationships exist between packages that it calls for a redesign of the application by joining those packages into one.
From a HP support SE I heard that beginning from MC/SG release 11.16 there should exist the possibility to stagger package startup and shutdown order.
Maybe you can find out by having a look at the release notes.
Unfortunately our SG release is quite dated (i.e. 11.12) and even out of support by now,
which forces you into the evil scripting cludge if the application designers are reluctant to overthink their concept.
Madness, thy name is system administration
Olivier Masse
Honored Contributor

Re: MCSG-to start second package depending on main package

I think there is no built-in way in SG to do this.

I had to do this once, and to make it work I coded a while() loop in customer_defined_run_mcds that ran cmviewcl and checked whether the dependent package was running or not. If you do this, I suggest you sleep for 5 seconds in the loop to prevent running cmviewcl too much and increase a counter to be able to get out after a certain number of times and quit.

Note that with 11.16 this also works if you're dependent on a package on another cluster too. You'll have to setup the access roles in the config files and there is an option to cmviewcl that lets you query another cluster.

Good luck
Mahadev Pednekar
Frequent Advisor

Re: MCSG-to start second package depending on main package

Hi,
Thanks for your help, especially Devendar, I inserted delay parameter in second package and problem was resolved.
regds,
MP