Forum Discussion

krisofe's avatar
krisofe
Level 3
14 years ago

Ressource type Process : what does vcs wait for after executing script ? [RESOLVED]

[SOLVED]

 

Thks for all answers.

I wanted make another solution for my first question but the great solution before has been deleted from me, sorry blush

Fortheremore, I don't know how to make my post as solution.

In fact, to have a script to be runned before SG starting or after they are stopped, I should use the post online or offline trigger.

 

 

 

Hi,

 

I've just created a process ressource in auto start mode which runs when vcs go

to second of my 2 nodes in Fail Over mode.

 

My little script test.sh is well executed on the active node from my ressource but

falls in fault so my SG becomes in Partial online.

 

What vcs waits for to become full online after GS execution ressources OK ?

 

Thks,

 

Christophe, FR

  • Hello,

    VCS declares resource online once whatever described in online script has completed, followed by one successful monitor cycle.

    point to note is, VCS doesn't understand normal exit codes 0 & 1 .... if you have configured anything manually for monitor script, you should change the exit codes to 110 & 100 where 110 is successful & 100 is unsuccesful.

    I would suggest you to double check on monitor script for your process resource with above exit codes in place..

     

    Gaurav

  • If you are have created a Process resource rather than an Application resource, then this is probably your issue - you should create an Application resource.  The process resource will run test.sh and then look to see if test.sh exists in the process table, but probably your test.sh kicks off other processes and then exits, so you need to monior the processes your test.sh scripts kicks off, not "test.sh" itself.  Process resource is meant for Processes like daemons, not scripts.

    So set-up an Application resource with StartProgram as test.sh, use MonitorProcesses to specify the Processes that test.sh kicks off and you need to write a script which stops these processes which you specify as the StopProgram.  If test.sh does not kick off processes, then you can use MonitorProgram instead of MonitorProcesses.

     

    Mike

  • Thanks both for your quick feedback ;-)

    Effectively, I was looking arround process ressource because there were no

    more relevant ressources type but just WebApplication.

     

    I'm not at office so I can't see this specific ressource that I have to take in instead of.

    So I will look after this hidden "Application Ressource" next and will give U feedback.

     

    Regards,

     

    Christophe

  • I assume you are using UNIX as ".sh" suffix is usully used for UNIX shell scripts.  For UNIX, the Application agent is not hidden - it is a standard resource type.  For Windows, there is no Application agent, only Process and GenericService agents.

     

    Mike