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

Additional Download Problems #96

Open
pluttrell opened this issue Sep 17, 2014 · 5 comments
Open

Additional Download Problems #96

pluttrell opened this issue Sep 17, 2014 · 5 comments

Comments

@pluttrell
Copy link

Starting this evening, when using config.omnibus.chef_version = :latest, I'm getting the following using multiple cookbooks on multiple machines:

==> default: Downloading Chef 11.16.2 for ubuntu...
==> default: downloading https://www.getchef.com/chef/metadata?v=11.16.2&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64
==> default:   to file /tmp/install.sh.5513/metadata.txt
==> default: trying wget...
==> default: ERROR 404
==> default: Unable to retrieve a valid package!
==> default: Please file a bug report at http://tickets.opscode.com
==> default: Project: Chef
==> default: Component: Packages
==> default: Label: Omnibus
==> default: Version: 11.16.2
==> default:  
==> default: Please detail your operating system type, version and any other relevant details
==> default: Metadata URL: https://www.getchef.com/chef/metadata?v=11.16.2&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64
Vagrant::Errors::VagrantError: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

sh install.sh -v 11.16.2 2>&1

Stdout from the command:

Downloading Chef 11.16.2 for ubuntu...
downloading https://www.getchef.com/chef/metadata?v=11.16.2&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64
  to file /tmp/install.sh.5513/metadata.txt
trying wget...
ERROR 404
Unable to retrieve a valid package!
Please file a bug report at http://tickets.opscode.com
Project: Chef
Component: Packages
Label: Omnibus
Version: 11.16.2

Please detail your operating system type, version and any other relevant details
Metadata URL: https://www.getchef.com/chef/metadata?v=11.16.2&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64

@atward
Copy link

atward commented Sep 17, 2014

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.

@atward
Copy link

atward commented Sep 17, 2014

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?

@tmatilai
Copy link
Contributor

The code in retrieve_latest_chef_version (and elsewhere) predates the existence of the metadata API. Feel free to suggest better approaches now. =)

@lamont-granquist
Copy link
Contributor

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").

@lamont-granquist
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants