Skip to content

Instantly share code, notes, and snippets.

@vignesh-v3
Created December 3, 2016 17:17
Show Gist options
  • Save vignesh-v3/492c1c388ace90303f4abef5d4f00e00 to your computer and use it in GitHub Desktop.
Save vignesh-v3/492c1c388ace90303f4abef5d4f00e00 to your computer and use it in GitHub Desktop.
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/hwk/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `localhost' for Custom resource mysqldump from cookbook mysqldump
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/hwk/recipes/mysql_dump.rb:6:in `block in from_file'
/tmp/kitchen/cache/cookbooks/hwk/recipes/mysql_dump.rb:5:in `from_file'
/tmp/kitchen/cache/cookbooks/hwk/recipes/default.rb:11:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/hwk/recipes/mysql_dump.rb:
1: mysql_client 'default' do
2: action :create
3: end
4:
5: mysqldump '~/.dumpfile.sql' do
6>> dbhost localhost
7: dbuser drupaluser
8: dbpassword drupalpass
9: dbname drupal_db
10: overwrite true
11: end
12:
Platform:
---------
x86_64-linux
Running handlers:
[2016-12-03T17:15:36+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-12-03T17:15:36+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 13 seconds
[2016-12-03T17:15:36+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-12-03T17:15:36+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-03T17:15:36+00:00] ERROR: undefined method `localhost' for Custom resource mysqldump from cookbook mysqldump
[2016-12-03T17:15:36+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment