AnsweredAssumed Answered

custom perl probe check alive status problem

Question asked by 1_slash on Nov 6, 2012
Latest reply on Jan 9, 2013 by 1_keithk

I need an expert advice here.

 

I have a Perl-based probe that does this:

1. get all hubs, get all robots

2. for each robot, send soap calls to external CMDB, retrieve info, compare it with robot callbacks, such as get_info, get_environment, update it if doesnt match CMDB entries, etc.

 

This code works great if executed manually using command line, but if it is started by controller, it will get restarted by controller every 20mins - here's the problem:

1. the controller send _status callback every 5mins to each probe and expecting a response.

2. the controller give another three retries before concluding that the probe hangs.

3. if it hangs, the controller will restart the probe. this happen in 5mins + (5mins x 3 retries) = 20mins

 

here's the important structure of the code:

+++++++++++++++++++++++++

$sess->dispatch($timeout);

 

sub timeout { #this function is called by dispatch after timeout (1 sec)

   do something

}

+++++++++++++++++++++++++

 

the 'do something' part takes more than 20 mins due to abundant number of robots that we have under a hub.

 

what would be your advise in the code structure to enable the probe still serves callback requests while doing "do something" function? or perhaps, is there any way to tell controller not to check the probe alive status?

 

Thanks in advance.

Outcomes