Open pluttrell opened 10 years ago
Appears to be an issue with retrieve_latest_chef_version which is checking gem to get the latest version (11.16.2 as of writing) but only 11.16 is available via getchef.com/chef/metadata.
Pinning your Vagrant config.omnibus.chef_version to '11.16' is a workaround for this until 11.16.2 is published by opscode.
It'd be nice if vagrant-omnibus checked against the omnibus metadata to get latest version.
It's perfectly valid to pass in latest to opscode metadata. eg: https://www.getchef.com/chef/metadata?v=latest&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64
Is there any reason to do retrieve_latest_chef_version?
The code in retrieve_latest_chef_version
(and elsewhere) predates the existence of the metadata API. Feel free to suggest better approaches now. =)
So, using :latest
is kinda stupid on the face of it, for fundamental reasons. You'll probably break when we push 12.0.0 and this code immediately pulls that and you get upgraded to chef-12 on the day we release it. The omnitruck API supports partial versions so that if you pass "11" to it, it'll serve the latest 11.x that omnitruck knows about, which is probably the behavior that people who are using :latest
actually want. This will also be the behavior in knife bootstrap
in chef-12. Right now in chef-11 it uses the gem version you've installed as a version pin (so would use 11.16.2 if you installed that gem and did a knife bootstrap
), in chef-12 that code has been changed so that it peels off the major version number from knife and then uses that as the omnitruck version to bootstrap (i.e. "12").
Just checked the code and omnitruck does support 'latest' as a string to the API (or you can just omit the version argument entirely). So the first step is that :latest should be mapped on that, but please include a loud WARN to people that they'll get major version bumped without any warning and their cookbooks may break and nobody will apologize to them about it.
Starting this evening, when using
config.omnibus.chef_version = :latest
, I'm getting the following using multiple cookbooks on multiple machines: