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

Problem with Mariadb & Mysql2_chef_gem #42

Open
idistech opened this issue Jul 12, 2017 · 0 comments
Open

Problem with Mariadb & Mysql2_chef_gem #42

idistech opened this issue Jul 12, 2017 · 0 comments

Comments

@idistech
Copy link

Hi,
Apologises if Im asking a stupid queston.

I have been running for years chef cookbooks on Ubuntu
System Ubuntu 16.04,
Cookbooks : database, mariad, mysql2_chef_gem

Im recently since upgrades to Maria 10.2 and usual OS changes, my chef system has started to fail.
I removed the pre-complied gems, but this didnt help.

I have also recently upgraded to mysql2_chef_gem 2.0.1.

There is a dependency in 2.0.1 to include mysql ( but Im using Mariadb), and this causes the compilation to fail.. here is an extract..

` - mariadb (1.5.1)

  • unix_bin (0.2.9)
  • mysql (8.4.0)
  • mysql2_chef_gem (2.0.1)

Installing Cookbook Gems:
Compiling Cookbooks...

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb

NameError

uninitialized constant MysqlCookbook::Helpers

Cookbook Trace:

/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb:7:in <class:MysqlClient>' /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb:6:in class:Provider'
/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb:5:in <class:Chef>' /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb:4:in <top (required)>'

Relevant File Content:

/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_client.rb:

1: require 'chef/provider/lwrp_base'
2: require_relative 'helpers'
3:
4: class Chef
5: class Provider
6: class MysqlClient < Chef::Provider::LWRPBase
7>> include MysqlCookbook::Helpers
8: provides :mysql_client if defined?(provides)
9:
10: use_inline_resources if defined?(use_inline_resources)
11:
12: def whyrun_supported?
13: true
14: end
15:
16: action :create do

Platform:

x86_64-linux`

I have managed to fix this, by removing the mysql dependency in the mysql2_chef_gem on mysql, so it is not included, but clearly this is a fudge..

Any experience's out there clearly welcome.

BTW : I see that 'database' is now depreciated.. so...what _is then the right way to do a 'mysql_database' to set up a database ? it seems ( with mysql2_chef_gem ) perfer a critical function/helper...
confused of England.
;-)

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