Quantcast

Deployment of some problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Deployment of some problems

Mr_xushuai
Hi yan,
First of all, I do appreciate you for giving me such a good product for automated deployment.Now we are work on glu system.

I hava some question,I need you help.

When I use the rootShell.fetch to download war file, but sometimes it's failed because of network reasons, is there any way to retry? The glu System waiting for some amount of time (default to 10s) if still pending,Then throws time out of exception.Do you have any suggestion?

I use restful api to create a plan , return a planid, after about 20 minutes later, But I call execution plan interface, return 404 (NOT_FOUND) "no such plan", Sometimes It's sucessful.Could you tell me something about create plan?

Best regard!
Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment of some problems

frenchyan
Administrator
There is no "retry" built-in for downloading. That being said, you can use the shell.waitFor feature to implement it... something like this:

shell.waitFor(heartbeat: '1s') {
  try
  {
    shell.fetch("xxx")
    // if you are here => everything worked => return true to exit "waitFor"
    return true
  }
  catch(/* exception when failure */)
  {
    // if you are here => there was an error => return false to loop "waitFor" (after waiting "hearbeat")
    return false
  }
}

In regards to create plan / execute plan there is a cache timeout: when you call create, it generates the plan, create an id for it and return the id. At that time the plan is only stored in memory. In order for the memory to not grow forever, if the plan is not used within 5mns it is discarded: https://github.com/pongasoft/glu/blob/master/orchestration/org.linkedin.glu.orchestration-engine/src/main/groovy/org/linkedin/glu/orchestration/engine/deployment/DeploymentServiceImpl.groovy#L47

When the plan is generated, it compares the static model to the live model... because of the dynamic nature of the system, it does not make too much sense to create a plan and not use it right away (the 5mns timeout is actually very generous...).

Yan


Loading...