From 3a0d36aa5aa57874340301e7c32ee3f305567a9f Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Wed, 3 Aug 2016 11:24:10 -0700 Subject: [PATCH] Increment mysql cookbook version - Bump mysql to 7.2 - Bump mysql2_chef_gem to 1.1.0 - Work around https://github.com/chef/chef-dk/issues/966 - fixes minor bug in postgres-server_spec and server_spec Change-Id: I6e906c5fad0360a7d9718fc5d5cda2983c3b768e Depends-On: I07ad79a93642d0f0c934a864fcb9bcd7b764e35f Implements: blueprint newton-xenial --- metadata.rb | 4 ++-- recipes/mysql-client.rb | 5 +++++ spec/postgresql-server_spec.rb | 2 +- spec/server_spec.rb | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/metadata.rb b/metadata.rb index b707940..88de156 100755 --- a/metadata.rb +++ b/metadata.rb @@ -23,8 +23,8 @@ end depends 'mariadb', '~> 0.3.1' depends 'percona', '~> 0.16.1' -depends 'mysql', '~> 6.0.13' -depends 'mysql2_chef_gem', '~> 1.0.1' +depends 'mysql', '~> 7.2.0' +depends 'mysql2_chef_gem', '~> 1.1.0' depends 'postgresql', '~> 3.4.18' depends 'database', '~> 4.0.2' depends 'openstack-common', '>= 14.0.0' diff --git a/recipes/mysql-client.rb b/recipes/mysql-client.rb index 59ea656..5763d81 100644 --- a/recipes/mysql-client.rb +++ b/recipes/mysql-client.rb @@ -28,6 +28,11 @@ mysql2_chef_gem 'default' do action :install end +# Note(frickler): Work around for https://github.com/chef/chef-dk/issues/966 +bash 'fix gem ext dir' do + code "rmdir ~/.chefdk/gem/ruby/2.1.0/extensions && ln -s /opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions ~/.chefdk/gem/ruby/2.1.0/extensions || true" +end + node['openstack']['db']['python_packages']['mysql'].each do |pkg| package pkg end diff --git a/spec/postgresql-server_spec.rb b/spec/postgresql-server_spec.rb index 432ca26..3ed566f 100644 --- a/spec/postgresql-server_spec.rb +++ b/spec/postgresql-server_spec.rb @@ -12,7 +12,7 @@ describe 'openstack-ops-database::postgresql-server' do # The postgresql cookbook will raise an 'uninitialized constant # Chef::Application' error without this attribute when running # the tests - node.set_unless['postgresql']['password']['postgres'] = '' + node.set['postgresql']['password']['postgres'] = 'postgres_password' runner.converge(described_recipe) end diff --git a/spec/server_spec.rb b/spec/server_spec.rb index a8076c2..9640a50 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -18,7 +18,7 @@ describe 'openstack-ops-database::server' do # The postgresql cookbook will raise an 'uninitialized constant # Chef::Application' error without this attribute when running # the tests - node.set_unless['postgresql']['password']['postgres'] = '' + node.set['postgresql']['password']['postgres'] = 'postgres_password' expect(chef_run).to include_recipe( 'openstack-ops-database::postgresql-server')