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


Chronological Thread 
  • From: Brian Hatfield < >
  • To:
  • Subject: [chef] Re: Re: Re: CHEF-4579: should package action install also upgrade?
  • Date: Wed, 2 Oct 2013 16:17:17 -0400

My belief is that the "pragmatic reason to be inconsistent" is strong enough to override other lines of reasoning. In addition to the stated reasoning, I think changing this now would imply inverse behavior silently in any cookbook not refactored for this, as well as necessitate making sure every Chef developer is aware of the new behavior.

And unfortunately, I think that no matter how well publicized and how much of a push is put behind it, many admins will be surprised by a package they did not want upgraded being upgraded during a chef run. Many admins run Chef on a recurring daemon schedule, and don't control the repositories they use. Furthermore, while distro repos tend to be reliable, third party repos may not have such strong maintenance policies.

My opinion that this change is not worth the risk nor effort to publicize.

Brian


On Wed, Oct 2, 2013 at 3: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





Archive powered by MHonArc 2.6.16.

§