-
-
Notifications
You must be signed in to change notification settings - Fork 599
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
elasticsearch::ebs fails if apt package cache is out of date #88
Comments
For the sake of multi-platform compatibility it seems that including the 'build-essential' cookbook from opscode with node['build_essential']['compiletime'] = true is probably the best solution as that cookbook already has per-platform handling of updating packages at compiletime. |
@Pneumatus Indeed!, thanks for the suggestion, this seems to be the right fix -- verified now on Amazon Linux in EC2. |
For what it's worth, this change actually makes it worse for people who already include apt and build-essential. I'm not sure what factors determine the order (it probably is non-deterministic), but this change can cause build-essentials to run before an apt-get update for me, both running at compile time. For many systems, this actually breaks things if the package manifest is out of date (such as in the cloud). For me, it breaks b/c it tries to install autoconf before It seems to me that Also, |
@martinb3 Sorry to hear that :/ So, what should we do here in terms of code? |
@karmi Most community cookbooks don't try to take control of Filed an issue #241, will work on a PR that includes documentation. |
Given the current most recent EC2 AMI of Ubuntu 12.04 in us-east-1 (ami-d0f89fb9, according to http://cloud-images.ubuntu.com/locator/ec2/), any attempt to include the elasticsearch::ebs recipe in a run list before an 'apt-get update' has been issued results in a run failure.
This issue is due to the package cache being out of date when we try and upgrade the 'build-essential' package as the package currently referenced in the apt package cache results in HTTP 403s.
An apt-get update before upgrading the dependant packages solves this, but because the packages are being upgraded at compile-time, even including the 'apt' cookbook is no use. The compile-time run of these package installs happen before the 'apt' cookbook gets a chance to refresh the package cache.
As a temporary fix I've got a separate recipe with
execute('compiletime-apt-get-update') { command 'apt-get update' and action :nothing }.run_action(:run)
... but this of course runs every chef-client run, even though it's not necessary, and I'd imagine there is probably a more graceful solution that I have not thought of.
The text was updated successfully, but these errors were encountered: