Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require_chef_omnibus: latest reinstalls chef on each converge #387

Closed
failshell opened this issue Mar 17, 2014 · 4 comments
Closed

require_chef_omnibus: latest reinstalls chef on each converge #387

failshell opened this issue Mar 17, 2014 · 4 comments

Comments

@failshell
Copy link

When adding that parameter to .kitchen.yml, Chef is reinstalled on each 'kitchen converge' run. Even if the latest version is installed already.

@sethvargo
Copy link
Contributor

@failshell this is the correct behavior. If you want to pin to a particular version, put that in as the value. There's no way for TK to know if a new version of Chef is available without querying the server. And it does not make sense to perform 3 HTTP queries instead of one.

@adnichols
Copy link

@failshell To expand on this, there are three valid values for require_chef_omnibus:

  • true : this will simply ensure that chef is installed, independent of version.
  • false : test-kitchen will do nothing to validate that chef is installed or at correct version.
  • x.y.z (ex: 11.10.2) : This will ensure this specific version is installed.

I have been caught in the past by doing things like using a fuzzy version for this field, ex. 11.10 and this will never match an installed version of chef and thus test-kitchen will always re-install chef no matter what version you have. Also using a vagrant/docker image which has an older version of chef and specifying a newer version will similarly always install chef because it'll always see a mismatch.

@curiositycasualty
Copy link

Thank for you for the expansion @adnichols, I came here looking for require_chef_omnibus: true without knowing it.

@ghost
Copy link

ghost commented Dec 20, 2014

In my opinion that's nothing to do with version pinning (in fact it's reinstalling) and could not be the desired behaviour.
It's possible to query for the latest version and skip installation if the latest version is already installed, isn't it?

If you agree I'll submit a pull request.

@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants