sous-chefs / confluence

Development repository for the confluence cookbook
https://supermarket.chef.io/cookbooks/confluence
Other
43 stars 46 forks source link

Gets a compile error from mysql2_chef_gem in kitchen converge #153

Closed Paladin closed 5 years ago

Paladin commented 7 years ago

When I try this in a converge I get:

   Synchronizing Cookbooks:
     - pk_components (0.2.0)
     - bash (0.1.2)
     - sudo (3.1.0)
     - openssh (2.1.1)
     - mariadb (0.3.3)
     - postgresql (5.1.0)
     - apache2 (3.2.2)
     - pk_security (0.1.0)
     - iptables (4.1.0)
     - yum (5.0.1)
     - yum-epel (2.1.1)
     - build-essential (8.0.0)
     - openssl (7.0.1)
     - database (6.1.1)
     - java (1.48.0)
     - mysql (7.2.0)
     - mysql_connector (0.8.1)
     - mysql2_chef_gem (1.1.0)
     - system (0.11.2)
     - firewalld (1.1.5)
     - selinux (1.0.3)
     - selinux_policy (2.0.0)
     - fail2ban (4.0.0)
     - compat_resource (12.16.3)
     - seven_zip (2.0.2)
     - mingw (2.0.0)
     - windows (3.0.5)
     - homebrew (3.0.0)
     - yum-mysql-community (2.1.0)
     - cron (4.1.1)
     - hostsfile (2.4.5)
     - ohai (5.0.3)
     - rbac (1.0.3)
     - confluence (2.4.0)
     - apt (6.1.0)
     - ark (3.0.0)
     - smf (2.2.8)
   Installing Cookbook Gems:
   Compiling Cookbooks...

   ================================================================================
   Recipe Compile Error in /tmp/kitchen/cache/cookbooks/mysql2_chef_gem/libraries/z_provider_mapping.rb
   ================================================================================

   NoMethodError
   -------------
   undefined method `set' for Chef::Platform:Class

   Cookbook Trace:
   ---------------
     /tmp/kitchen/cache/cookbooks/mysql2_chef_gem/libraries/z_provider_mapping.rb:4:in `<top (required)>'

   Relevant File Content:
   ----------------------
   /tmp/kitchen/cache/cookbooks/mysql2_chef_gem/libraries/z_provider_mapping.rb:

     1:  #########
     2:  # mysql2_chef_gem
     3:  #########
     4>> Chef::Platform.set platform: :amazon, resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
     5:  Chef::Platform.set platform: :centos, version: '< 7.0', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
     6:  Chef::Platform.set platform: :centos, version: '>= 7.0', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
     7:  Chef::Platform.set platform: :debian, resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
     8:  Chef::Platform.set platform: :fedora, version: '< 19', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
     9:  Chef::Platform.set platform: :fedora, version: '>= 19', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
    10:  Chef::Platform.set platform: :omnios, resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
    11:  Chef::Platform.set platform: :redhat, version: '< 7.0', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
    12:  Chef::Platform.set platform: :redhat, version: '>= 7.0', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql
    13:  Chef::Platform.set platform: :scientific, version: '< 7.0', resource: :mysql2_chef_gem, provider: Chef::Provider::Mysql2ChefGem::Mysql

   System Info:
   ------------
   chef_version=13.0.118
   platform=centos
   platform_version=7.3.1611
   ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
   program_name=chef-client worker: ppid=22174;start=20:09:05;
   executable=/opt/chef/bin/chef-client
anuriq commented 7 years ago

Hi @Paladin This is not an issue with confluence cookbook. The thing is that chef-client 13 was released. It deprecates a lot of features that were widely used in community cookbooks. That's why in the following months expect a lot of cookbooks slowly transitioning to a new model, but currently a lot of them won't work with chef-client 13.

To install chef-client 12 manually, use: curl -LO https://omnitruck.chef.io/install.sh && sudo bash ./install.sh -v 12.19.36

To use chef-client 12 during testing in .kitchen.yml:

provisioner: chef_zero
  require_chef_omnibus: "12"

Was this helpful?

DavyJ0nes commented 7 years ago

Hey @anuriq, Thanks for the work around. Was having the same issue with mysql2_chef_gem and setting the following in my .kitchen.yml file worked around it for now.

provisioner: chef_zero
  require_chef_omnibus: "12"
lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.