[chef] Re: Re: Re: Re: Error in mysql cookbook


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Noah Kantrowitz < >
  • Subject: [chef] Re: Re: Re: Re: Error in mysql cookbook
  • Date: Wed, 05 Mar 2014 00:52:40 -0800

The "rhel" platform_family was initially supposed to be recompiled redhat enterprise linux clones (hence 'rhel' and not 'redhat') that are mostly compatible in all their versions of things and use the same platform_version numbering scheme -- so RHEL, CentOS, Scientific Linux and Oracle. Later 'amazon' snuck in there even though they upgrade all kinds of RPMs and use version numbers like "2013.09", which wasn't the original intent since 'amazon' is not rhel -- 'fedora' is also not 'rhel' either. We can add fedora to the rhel platform_family but it only sorta kicks the can down the road a bit and then this kind of thing breaks:

case platform_family
when "rhel"
 if platform_version.to_i == 6
   do_something_for_rhel6
 else
   do_something_for_rhel5
 end
end

On Wed Mar  5 00:09:01 2014, Noah Kantrowitz wrote:
Fedora has made numerous policy decisions over the past few years to make them highly 
incompatible with RHEL-ish OSes. As a shining topical example, Fedora no longer ships 
"real" MySQL, they ship MariaDB instead.

--Noah

On Mar 5, 2014, at 12:05 AM, Cassiano Leal 
< >
 wrote:

I'm interested in understanding why is Fedora not a part of the 'rhel' os 
family.

On Wednesday, March 5, 2014 at 8:00, Noah Kantrowitz wrote:

As I said on IRC, the issue is just that the code in the OpenStack recipe 
only has conditions for 'debian' and 'rhel' families. This means on Fedora 
that variable ends up being nil, which when interpolated as a string is ''.

--Noah

On Mar 4, 2014, at 11:53 PM, Peeyush Gupta 
< >
 wrote:

Hi all,

I am trying to deploy openstack using openstack-chef-repo 
(https://github.com/stackforge/openstack-chef-repo). I am using fedora 19 and 
here is the error I am getting:

================================================================================
Recipe Compile Error in 
/var/chef/cache/cookbooks/openstack-ops-database/recipes/server.rb
================================================================================


ArgumentError
-------------
Bad string format template[], you must have a string like resource_type[name]!


Cookbook Trace:
---------------
/var/chef/cache/cookbooks/openstack-ops-database/recipes/mysql-server.rb:50:in
 `from_file'
/var/chef/cache/cookbooks/openstack-ops-database/recipes/server.rb:22:in 
`from_file'


Relevant File Content:
----------------------
/var/chef/cache/cookbooks/openstack-ops-database/recipes/mysql-server.rb:

43: case node['platform_family']
44: when 'debian'
45: mycnf_template = '/etc/mysql/my.cnf'
46: when 'rhel'
47: mycnf_template = 'final-my.cnf'
48: end
49:
50>> r = resources("template[#{mycnf_template}]")
51: r.notifies_immediately(:restart, 'service[mysql]')
52:
53: mysql_connection_info = {
54: host: 'localhost',
55: username: 'root',
56: password: node['mysql']['server_root_password']
57: }
58:
59: mysql_database 'FLUSH PRIVILEGES' do

Now, I talked to people on IRC and apparently not all cookbooks work with 
Fedora. I don't plan to put Fedora in production, we would be using RHEL 
there, I tried it only for testing purposes. But I am still interested to 
know, what is causing this error? I mean I have template defined, the why 
isn't the cookbook able to find it? Isn't Fedora a part of RHEL family 
anymore?
Thanks,
~Peeyush Gupta







Archive powered by MHonArc 2.6.16.

§