Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Update mysql cookbook (6.x) and database cookbook #103

Merged
merged 8 commits into from
Jul 8, 2015

Conversation

patcon
Copy link
Collaborator

@patcon patcon commented Jul 5, 2015

I think we could do this pretty easily. Looking at the other issue, it seems the only problem was that when the database cookbook bumped major versions, it abstracted out a recipe (mysql2_chef_gem), and I think we could just add that back in

@linc01n
Copy link
Collaborator

linc01n commented Jul 5, 2015

Hmm...
When I test run it, it gives me error

==> centos6: NoMethodError
==> centos6: -------------
==> centos6: undefined method `version' for Chef::Resource::MysqlClient
==> centos6:
==> centos6:
==> centos6: Cookbook Trace:
==> centos6: ---------------
==> centos6: /tmp/vagrant-chef/6d85d9c914cef1b3ceae556d9c1d3737/cookbooks/mysql2_chef_gem/libraries/provider_mysql2_chef_gem_mysql.rb:17:in `block (2 levels) in <class:Mysql>'
==> centos6: /tmp/vagrant-chef/6d85d9c914cef1b3ceae556d9c1d3737/cookbooks/mysql2_chef_gem/libraries/provider_mysql2_chef_gem_mysql.rb:16:in `block in <class:Mysql>'

@patcon
Copy link
Collaborator Author

patcon commented Jul 5, 2015

Seems you're still using v5.x mysql cookbook series? Maybe check your berksfile.lock to confirm? (You want to be on v6.x now)

@linc01n
Copy link
Collaborator

linc01n commented Jul 6, 2015

@mrjcleaver
Copy link

There seems to be a bunch of code in various branches on the network https://github.com/bflad/chef-stash/network, including @andrewgoktepe 's at andrewgoktepe@4652752

patcon added a commit to patcon/chef-stash that referenced this pull request Jul 6, 2015
@patcon patcon force-pushed the feature/update-database-cookbook branch 2 times, most recently from 121964e to 0731fee Compare July 6, 2015 21:58
@patcon
Copy link
Collaborator Author

patcon commented Jul 7, 2015

FYI, I think I got this working, but let's get postgresql test suite (#107) running before merging this, and I can rebase

(I'm using it from my feature branch for mysql, but not postgresql yet, and can't say with 100% certainty that it works for both)

* Attribute exists in README and in recipes, but not set in attributes
  file, so assuming it was a regressions and added it back.
* mysql_service expects a string.
The advice from the maintainers is to just connect over TCP socket, as
we'll be fighting with the mysql_service LWRP if we continue to use unix
sockets:

sous-chefs/mysql#344 (comment)

We could hardcode a socket path in the database LWRP's connection hash, or the
mysql_service's `socket` resource attr, but then it will be complexity
and stuff to break on other systems:

https://github.com/chef-cookbooks/mysql/blob/e13c394c0e7cce1ff720632f9ed098f6766403de/libraries/helpers.rb#L221-L225
@patcon patcon force-pushed the feature/update-database-cookbook branch from 0731fee to 405c8eb Compare July 7, 2015 18:59
@patcon patcon changed the title relax database cookbook version constraint Update mysql cookbook to 6.x Jul 7, 2015
@patcon
Copy link
Collaborator Author

patcon commented Jul 7, 2015

Just rebased on master and updated issue title to better reflect work

EDIT: Haven't yet run tests. I'll get cloud testing (#108) working tomorrow before getting to this, as I expect some tests broke (particularly postgresql)

@patcon patcon changed the title Update mysql cookbook to 6.x Update mysql cookbook (6.x) and database cookbook Jul 7, 2015
@linc01n linc01n merged commit 405c8eb into bflad:master Jul 8, 2015
@linc01n
Copy link
Collaborator

linc01n commented Jul 8, 2015

👍 Merged but I changed README.md and metadata.rb

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

Successfully merging this pull request may close these issues.

3 participants