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

Example fails on Centos 6 machines due to missing EPEL repo #1

Open
jonathanq opened this issue Dec 17, 2013 · 1 comment
Open

Example fails on Centos 6 machines due to missing EPEL repo #1

jonathanq opened this issue Dec 17, 2013 · 1 comment

Comments

@jonathanq
Copy link

A fresh clone of the repo + vagrant up centos-6 fails.

Running chef-solo...
[2013-12-16T22:11:47+00:00] INFO: Forking chef instance to converge...
[2013-12-16T22:11:47+00:00] INFO: *** Chef 11.8.2 ***
[2013-12-16T22:11:47+00:00] INFO: Chef-client pid: 3759
[2013-12-16T22:11:47+00:00] INFO: Setting the run_list to ["recipe[omnibus::default]"] from JSON
[2013-12-16T22:11:47+00:00] INFO: Run List is [recipe[omnibus::default]]
[2013-12-16T22:11:47+00:00] INFO: Run List expands to [omnibus::default]
[2013-12-16T22:11:47+00:00] INFO: Starting Chef Run for sample-python-app-omnibus-build-lab
[2013-12-16T22:11:47+00:00] INFO: Running start handlers
[2013-12-16T22:11:47+00:00] INFO: Start handlers complete.
[2013-12-16T22:11:48+00:00] WARN: An Omnibus platform recipe does not exist for the platform_family: rhel
[2013-12-16T22:11:48+00:00] INFO: directory[/opt/sample-python-app] created directory /opt/sample-python-app
[2013-12-16T22:11:48+00:00] INFO: directory[/opt/sample-python-app] owner changed to 900
[2013-12-16T22:11:48+00:00] INFO: directory[/opt/sample-python-app] mode changed to 755
[2013-12-16T22:11:48+00:00] INFO: directory[/var/cache/omnibus] created directory /var/cache/omnibus
[2013-12-16T22:11:48+00:00] INFO: directory[/var/cache/omnibus] owner changed to 900
[2013-12-16T22:11:48+00:00] INFO: directory[/var/cache/omnibus] mode changed to 755
[2013-12-16T22:12:19+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-12-16T22:12:19+00:00] ERROR: Running exception handlers
[2013-12-16T22:12:19+00:00] ERROR: Exception handlers complete
[2013-12-16T22:12:19+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-12-16T22:12:19+00:00] ERROR: package[libyaml-devel] (omnibus::ruby line 45) had an error: Chef::Exceptions::Package: No version specified, and no candidate version available for libyaml-devel

================================================================================
Error executing action `install` on resource 'package[libyaml-devel]'
================================================================================


Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for libyaml-devel


Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/omnibus/recipes/ruby.rb

 45:     package "libyaml-devel"
 46:     package "openssl-devel"

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/omnibus/recipes/ruby.rb:45:in `from_file'

package("libyaml-devel") do
  action :install
  retries 0
  retry_delay 2
  package_name "libyaml-devel"
  cookbook_name :omnibus
  recipe_name "ruby"
end

The issue appears to be missing EPEL repos from CentOS. However when you look at the output there is a warning line:

[2013-12-16T22:11:48+00:00] WARN: An Omnibus platform recipe does not exist for the platform_family: rhel

Which makes no sense - the pulled in omnibus cookbook version from the Berkshelf.lock file is 1.0.8. And the 1.0.8 version of omnibus does include a rhel recipe: https://github.com/opscode-cookbooks/omnibus/tree/1.0.8/recipes

Just for fun I bumped the omnibus-cookbook version to 1.1.0 and it failed with the same error (and warning about a missing platform recipe for rhel".

I tried to use version 1.2.2 of omnibus but it keeps failing on an rbenv problem trying to interact with git - but that is something to do with my ISP and git which has been causing my lots of problems all day.

On the 1.0.8 attempt I went into the vm and ran these commands:

[vagrant@sample-python-app-omnibus-build-lab ~]$ sudo rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
[vagrant@sample-python-app-omnibus-build-lab ~]$ sudo rpm -Kih http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

And then did vagrant provision centos-6 and it ran fine and built the rpm.

@jonathanq
Copy link
Author

Found the issue. On my machine it was pulling in version 3.0 of the yum cookbook (which has lots of breaking changes - like, no epel recipe). The try/rescue in the omnibus cookbook was trying to import the platform family recipe but was hiding the actual error (found it when I turned on debug logging):

[2013-12-17T06:19:17+00:00] DEBUG: Found recipe default in cookbook omnibus
[2013-12-17T06:19:17+00:00] DEBUG: Loading Recipe omnibus::rhel via include_recipe
[2013-12-17T06:19:17+00:00] DEBUG: Found recipe rhel in cookbook omnibus
[2013-12-17T06:19:17+00:00] DEBUG: Loading Recipe yum::epel via include_recipe
[2013-12-17T06:19:17+00:00] WARN: An Omnibus platform recipe does not exist for the platform_family: rhel
...
[Berkshelf] Using yum (3.0.0)
...

I added a version constraint on yum to < 3.0 in #2 which solves the issue for me.

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

No branches or pull requests

1 participant