[chef] Re: Re: apt-get update strategy


Chronological Thread 
  • From: Rob Guttman < >
  • To:
  • Subject: [chef] Re: Re: apt-get update strategy
  • Date: Fri, 25 Mar 2011 09:35:12 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=wC16D2OWPMUVkqWzq3lnG7hJY/+5/nuIn4gLdNwqW2ycz493z7IJf7gIgFZ+FhQ/Y8 usrh3ioS+kyqWL3XP4zrmhrr4tU20R/zhmkgMJHz3xkfEIuVsc1vRs3+0akoYgCDf78Q KMCqgFuML/QTpYCgQxprwYevt/TpbeTZZPjXc=

Michael, my current workaround is to effectively run "apt-get update" as a cron job once per day and also upon a host (re)boot.  Our longer-term workaround idea is to mirror the apt repos locally which would solve this and other apt problems (e.g., updates or dropped support of package versions we depend upon).

These workarounds are not ideal and may not be appropriate for everyone.

- Rob


On Fri, Mar 25, 2011 at 9:18 AM, Michael Hale < "> > wrote:
Maybe a feature could be added to the package resource/providers to
handle updating the package caches once per run?

On Fri, Mar 25, 2011 at 5:45 AM, Luke Biddell < "> > wrote:
> A recent failure in the apache cassandra apt repo got me thinking
> about the way I've assembled my cookbooks. I have the apt cookbook
> first in my run and do an update. The repo being down gave me the
> classic "apt-get update returned 100" error within chef.
>
> The failure meant that none of my recipes ran against the node (and
> updated our application war file), despite the fact that the node had
> previously been converged and all the required apt packages were
> already installed.
>
> My chef run needs to be resilient to those kinds of failures as once a
> node is initially converged and all apt packages installed, apt
> doesn't need to do an update (I don't do package :upgrade at the
> moment).
>
> So what I'd ideally like is to be able to trigger an apt-get update on
> the first package which requires installing. If no packages require
> installing, no apt-get update is performed. The fact an update has
> been performed needs to be recorded as we don't want to do it for
> every package that's installed as it will kill performance. Once is
> enough per chef run unless we add/remove a sources.list.d entry (which
> I already handle using :notifies).
>
>
> Opinions welcome, am I looking and an LWRP?
>




Archive powered by MHonArc 2.6.16.

§