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

Make cookbook compatible with Chef 13 #13

Open
luccotta opened this issue Jun 22, 2018 · 2 comments
Open

Make cookbook compatible with Chef 13 #13

luccotta opened this issue Jun 22, 2018 · 2 comments

Comments

@luccotta
Copy link

Cookbook Version

3.0.0

Chef Client Version

13

Platform Details

CentOS7

Scenario

Running this cookbook with Chef 13

Steps to Reproduce

Run the cookbook with Chef 13

Expected Result

Cookbook executed successfully.

Actual Result

Failing because mysql2_chef_gem ~> 1.0 is not compatible with Chef 13

@zuazo
Copy link
Owner

zuazo commented Jun 23, 2018

Thanks for the issue 😄 Please, could you paste the full error output?

@luccotta
Copy link
Author

Hello Zuazo, sure, please see below. I ran on MacOS now, but on CentOS7 it's the same.
Thanks!



[2018-06-23T03:15:27-03:00] INFO: Loading cookbooks [[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]]
[2018-06-23T03:15:27-03:00] INFO: Skipping removal of obsoleted cookbooks from the cache
Synchronizing Cookbooks:
  - mycookbook (0.1.0)
  - postfixadmin (3.0.0)
  - ark (2.2.1)
  - database (6.1.1)
  - encrypted_attributes (0.6.0)
  - mysql (8.5.1)
  - apache2 (3.3.1)
  - chef_nginx (5.1.3)
  - openssl (6.1.1)
  - compat_resource (12.19.1)
  - postgresql (6.1.4)
  - mysql2_chef_gem (1.1.0)
  - ssl_certificate (2.1.0)
  - yum-epel (0.7.1)
  - php-fpm (0.8.0)
  - build-essential (8.1.1)
  - windows (4.3.2)
  - seven_zip (3.0.0)
  - ohai (5.2.3)
  - runit (4.1.1)
  - zypper (0.4.0)
  - php (2.2.1)
  - iis (7.0.0)
  - mariadb (1.5.4)
  - mingw (2.0.2)
  - yum (5.1.0)
  - packagecloud (1.0.0)
  - xml (3.1.2)
  - apt (7.0.0)
  - yum-scl (0.2.0)
  - inifile_chef_gem (0.1.0)
  - selinux_policy (2.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...

================================================================================
Recipe Compile Error in /Users/luccotta/Projects/chef_tmp/.chef/local-mode-cache/cache/cookbooks/mysql2_chef_gem/libraries/z_provider_mapping.rb
================================================================================

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

Cookbook Trace:
---------------
  /Users/luccotta/Projects/chef_tmp/.chef/local-mode-cache/cache/cookbooks/mysql2_chef_gem/libraries/z_provider_mapping.rb:4:in `<top (required)>'

Relevant File Content:
----------------------
/Users/luccotta/Projects/chef_tmp/.chef/local-mode-cache/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.8.5
platform=mac_os_x
platform_version=10.13.3
ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin14]
program_name=chef-client worker: ppid=15399;start=03:15:17;
executable=/opt/chefdk/bin/chef-client


Running handlers:
[2018-06-23T03:15:28-03:00] ERROR: Running exception handlers
Running handlers complete
[2018-06-23T03:15:28-03:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 11 seconds
[2018-06-23T03:15:28-03:00] FATAL: Stacktrace dumped to /Users/luccotta/Projects/chef_tmp/.chef/local-mode-cache/cache/chef-stacktrace.out
[2018-06-23T03:15:28-03:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-06-23T03:15:28-03:00] ERROR: undefined method `set' for Chef::Platform:Class
[2018-06-23T03:15:28-03:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

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

No branches or pull requests

2 participants