- From: "John E. Vincent (lusis)" <
>
- To:
- Subject: [chef] Re: Re: Re: Re: CHEF-3930: Run apt-get update automagically if apt-get install fails
- Date: Wed, 27 Feb 2013 19:20:08 -0500
On Wed, Feb 27, 2013 at 6:44 PM, Andrea Campi
<
>
wrote:
>
>
>
>
On Thu, Feb 28, 2013 at 12:19 AM, Bryan McLellan
>
<
>
>
wrote:
>
>
Is anyone opposed to the idea of it simply being a flag, that in the
case of a missing package, apt-get update or yum update is called and
a single retry is performed? That would likely solve 95% of the
problems I have when this happens.
>
> On Wed, Feb 27, 2013 at 6:05 PM, Andrea Campi
>
> <
>
>
> wrote:
>
> > What about making it opt-in / opt-out with an attribute?
>
> > I don't much care which way the default is, but it would sure be nice to
>
> > have the option.
>
>
>
> It would have to be a global attribute and the only established
>
> pattern we have for that is Chef::Config options. These can kind of be
>
> managed by templatizing the client.rb (e.g. chef-client cookbook) but
>
> it's less of a "flag" than would be convenient for this sort of thing.
>
>
>
> The reason it can't be a resource attribute is if you want it the
>
> other way around, you're populating "auto_update true/false" in every
>
> package resource in every cookbook if you want it the other way
>
> around.
>
>
>
D'oh, for some reason I was thinking "cookbook".
>
>
>
>
> But yeah, it feels awesome. Of course the apt package provider should
>
> help me with my apt-cache! We also felt it violates a Chef Law, but
>
> none of us could name it.
>
>
>
>
Yeah, it feels a bit "do what I mean", but in this case I think that's quite
>
reasonable.
>
>
Playing devil's advocate, how will that work with cookbooks that use
>
apt_repository, which runs apt-get update ?
>
Worst case there will be more than one apt-get update in a single run (and
>
that probably only if the package is not there for real).
>
Can you think of other edge cases?
Archive powered by MHonArc 2.6.16.