[ 
https://issues.apache.org/jira/browse/WHIRR-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209289#comment-13209289
 ] 

Karel Vervaeke commented on WHIRR-501:
--------------------------------------

I agree with a retry loop around apt-get.

According to the apt-get man page, apt-get returns zero on normal operation, 
decimal 100 on error.
I don't know how 'normal operation' is defined, but its sounds safe to use this 
as the loop condition.
We could end the apt-get-install-with-retry with a check (dpkg -l 
$PACKAGENAME), if only for logging purposes.

There's also the 'postpone' command, which waits until a lockfile disappears 
before doing stuff
http://manpages.ubuntu.com/manpages/lucid/man1/postpone.1.html (see the -d flag)
This has 2 weak points:
(1) apt-get install postpone (chicken or egg problem)
(2) doesn't help with other transient failures (e.g. connection loss)

                
> Disable Crond before bootstrap and re-enable after configuration
> ----------------------------------------------------------------
>
>                 Key: WHIRR-501
>                 URL: https://issues.apache.org/jira/browse/WHIRR-501
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.5.0, 0.6.0, 0.7.0
>            Reporter: Andrei Savu
>             Fix For: 0.8.0
>
>
> This problem was identified by Karel and I think the easiest workaround we 
> can implement is to stop the crond service before bootstrap and start it 
> again after configuration. 
> Relevant info here: 
> http://www.cyberciti.biz/faq/howto-linux-unix-start-restart-cron/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to