Chef failed to install MySQL: no resouce, method or variable named create -
hi im trying install mysql on fresh centos 6.6 using chef
from project https://github.com/chef-cookbooks/mysql worte following script
include_recipe 'selinux::disabled' mysql_service 'default' port '3306' version '5.7' initial_root_password 'youllneverguess' action [:create, :start] end
the metadata.rb looks this
depends 'selinux' depends 'mysql'
the configuration couldn't simpler.
when run script obtain
info -- m-01-centos-66: ================================================================================ info -- m-01-centos-66: error executing action `create` on resource 'mysql_service[default]' info -- m-01-centos-66: ================================================================================ info -- m-01-centos-66: info -- m-01-centos-66: nameerror info -- m-01-centos-66: --------- info -- m-01-centos-66: no resource, method, or local variable named `create_stop_system_service' `chef::provider::mysqlservice ""' info -- m-01-centos-66: info -- m-01-centos-66: cookbook trace: info -- m-01-centos-66: --------------- info -- m-01-centos-66: /tmp/kitchen/cache/cookbooks/mysql/libraries/provider_mysql_service.rb:39:in `block in <class:mysqlservice>' info -- m-01-centos-66: info -- m-01-centos-66: resource declaration: info -- m-01-centos-66: --------------------- info -- m-01-centos-66: # in /tmp/kitchen/cache/cookbooks/eon_hadoop/recipes/ranger.rb info -- m-01-centos-66: info -- m-01-centos-66: 12: mysql_service 'default' info -- m-01-centos-66: 13: port '3306' info -- m-01-centos-66: 14: version '5.7' info -- m-01-centos-66: 15: initial_root_password 'youllneverguess' info -- m-01-centos-66: 16: action [:create, :start] info -- m-01-centos-66: 17: end info -- m-01-centos-66: 18: info -- m-01-centos-66: info -- m-01-centos-66: compiled resource: info -- m-01-centos-66: ------------------ info -- m-01-centos-66: # declared in /tmp/kitchen/cache/cookbooks/eon_hadoop/recipes/ranger.rb:12:in `from_file' info -- m-01-centos-66: info -- m-01-centos-66: mysql_service("default") info -- m-01-centos-66: action [:create, :start] info -- m-01-centos-66: retries 0 info -- m-01-centos-66: retry_delay 2 info -- m-01-centos-66: default_guard_interpreter :default info -- m-01-centos-66: declared_type :mysql_service info -- m-01-centos-66: cookbook_name "eon_hadoop" info -- m-01-centos-66: recipe_name "ranger" info -- m-01-centos-66: port "3306" info -- m-01-centos-66: version "5.7" info -- m-01-centos-66: initial_root_password "youllneverguess" info -- m-01-centos-66: package_action :install info -- m-01-centos-66: end info -- m-01-centos-66: info -- m-01-centos-66: info -- m-01-centos-66: running handlers: info -- m-01-centos-66: [2015-06-25t13:05:36+00:00] error: running exception handlers info -- m-01-centos-66: running handlers complete info -- m-01-centos-66: [2015-06-25t13:05:36+00:00] error: exception handlers complete info -- m-01-centos-66: chef client failed. 2 resources updated in 40.87935617 seconds info -- m-01-centos-66: [2015-06-25t13:05:36+00:00] fatal: stacktrace dumped /tmp/kitchen/cache/chef-stacktrace.out info -- m-01-centos-66: [2015-06-25t13:05:36+00:00] error: mysql_service[default] (eon_hadoop::ranger line 12) had error: nameerror: no resource, method, or local variable named `create_stop_system_service' `chef::provider::mysqlservice ""' info -- m-01-centos-66: [2015-06-25t13:05:36+00:00] fatal: chef::exceptions::childconvergeerror: chef run process exited unsuccessfully (exit code 1) error -- m-01-centos-66: converge failed on instance <m-01-centos-66>. error -- m-01-centos-66: ------exception------- error -- m-01-centos-66: class: kitchen::actionfailed error -- m-01-centos-66: message: ssh exited (1) command: [sh -c ' al-mode --config /tmp/kitchen/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889 error -- m-01-centos-66: ---nested exception--- error -- m-01-centos-66: class: kitchen::transport::sshfailed error -- m-01-centos-66: message: ssh exited (1) command: [sh -c ' al-mode --config /tmp/kitchen/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889 error -- m-01-centos-66: ------backtrace------- error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/provisioner/base.rb:74:in `rescue in call' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/provisioner/base.rb:77:in `call' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:366:in `block in converge_action' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:488:in `call' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:488:in `synchronize_or_call' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:453:in `block in action' error -- m-01-centos-66: c:/opscode/chefdk/embedded/lib/ruby/2.1.0/benchmark.rb:279:in `measure' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:452:in `action' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:362:in `converge_action' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:341:in `block in transition_to' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:340:in `each' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:340:in `transition_to' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/instance.rb:138:in `converge' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/command.rb:176:in `public_send' error -- m-01-centos-66: c:/opscode/chefdk/embedded/apps/test-kitchen/lib/kitchen/command.rb:176:in `block (2 levels) in run_action' error -- m-01-centos-66: ----------------------
i have tried different versions of cookbook, differenet versions of database, restart scratch, solutions proposed in following pages chef mysql recipe fails, https://github.com/chef-cookbooks/mysql/issues/332, https://gist.github.com/faraazkhan/680c3e79c7524be355ca, couldn't further.
what doing wrong? missing configuration/parameter/attribute/dependency??
thank you
it seems reason mysql_service
not select right provider.
try add provider chef::provider::mysqlservice::sysvinit
mysql_service
.
mysql_service 'default' port '3306' version '5.7' initial_root_password 'youllneverguess' provider chef::provider::mysqlservice::sysvinit action [:create, :start] end
Comments
Post a Comment