rightscale/right_link — comment on commit 8fc498083b8cd9d2ac227e2439ce20cfccd92002
File: lib/instance/cook/executable_sequence.rb line 310
By xeger:

On second thought -- I think we have some partial retry logic already implemented, thanks to the fact that we are inside a block passed to retry_execution.

The way we're using retry_execution, it seems that we are making an assumption that yum, apt-get or zypper will return a non-zero exitstatus if ANY of the packages fails to be installed.

I confirmed that this is the case for apt-get (exitstatus 100). Don't know about zypper. Based on the ticket, we can assume that yum returns success in at least some cases when a package install fails and that this is the root cause of services' frustration, but probably good to test this.

My take is that we should have consistent behavior for all three packaging commands. In other words, we should do one of two things:

1) Be dumber: detect yum failures and handle them by next'ing a non-true value from our block, as we do with apt-get or zypper failures, thus causing yum install to retry until the counter runs out.

2) Be smarter: detect unknown packages for all three install commands, and fail immediately (auditing the specific missing package names) instead of retrying for awhile.