[chef] Re: Re: Re: CHEF-4579: should package action install also upgrade?


Chronological Thread 
  • From: Paul Mooring < >
  • To:
  • Subject: [chef] Re: Re: Re: CHEF-4579: should package action install also upgrade?
  • Date: Wed, 2 Oct 2013 13:13:01 -0700

From a pragmatic point of view, I think it's generally consider an upstream (distro) problem to worry about consistency in packages and Chef already allows versions to be specified if that's the desired effect.  In my opinion the install action shouldn't upgrade a package and it's the semantics of apt/yum that seem counter-intuitive.  We should also keep in mind that Chef is an automation tool, `apt-get install foo` updating foo is more of a "do what I mean, not what I say" dynamic where the user is generally watching output to say yes or no to the implications of an upgrade.  In terms of Chef we don't have the convenience of waiting for the user to approve the upgrade so a more conservative approach of not upgrading on an install action makes much more sense.


On Wed, Oct 2, 2013 at 12:56 PM, Daniel DeLeo < " target="_blank"> > wrote:

On Wednesday, October 2, 2013 at 12:33 PM, Brian Hatfield wrote:

No. I strongly object to this.

action :upgrade exists and is sufficient.

The question isn't whether action :install and action :upgrade should exist or have different behavior, but rather one of what default is most desirable given the tradeoffs of each. By comparison, the default action on a file is "create" which really means "create_or_update"; you can use action :create_if_missing if you want to avoid updating the files.

 

If action :install performed upgrades, it would absolutely destroy things, for example running MongoDB using the 10gen repos and having a 2.2 database upgrade to 2.4 behind your back, etc.
The reason we bring this up is the flip side of this coin. If the package in your repo gets updated, then a new machine you bring up with the same recipes will create a different system than your machines you provisioned before the repo update. This seems surprising, no? 

So the question is one of 

* user expectations: What should `package "tmux"` do when there's a newer version available?

* consistency: Is it weird/confusing that files get updated by default, but packages do not? Is it confusing that this default behavior means you can build a box with the exact same recipes and get a different result?

* pragmatic reason to be inconsistent: the risk of upgrading packages by default is so great that it's better if everyone using Chef learns that this is inconsistent, and why, and how to deal with it.

Thoughts?
 

Brian

-- 
Daniel DeLeo




--
Paul Mooring
Operations Engineer
Opscode, Inc.





Archive powered by MHonArc 2.6.16.

§