Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created May 7, 2015 12:10
Show Gist options
  • Select an option

  • Save AdamSaleh/0b2ae2f5b2e56bdb47e2 to your computer and use it in GitHub Desktop.

Select an option

Save AdamSaleh/0b2ae2f5b2e56bdb47e2 to your computer and use it in GitHub Desktop.
==> fhcap-asaleh-multi-node1: ================================================================================
==> fhcap-asaleh-multi-node1: Error executing action `run` on resource 'bash[secure-mysql]'
==> fhcap-asaleh-multi-node1: ================================================================================
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: Mixlib::ShellOut::ShellCommandFailed
==> fhcap-asaleh-multi-node1: ------------------------------------
==> fhcap-asaleh-multi-node1: Expected process to exit with [0], but received '1'
==> fhcap-asaleh-multi-node1: ---- Begin output of "bash" "/tmp/chef-script20150507-25183-qth6vl" ----
==> fhcap-asaleh-multi-node1: STDOUT:
==> fhcap-asaleh-multi-node1: STDERR: ERROR 1175 (HY000) at line 1: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
==> fhcap-asaleh-multi-node1: ERROR 1175 (HY000) at line 1: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
==> fhcap-asaleh-multi-node1: ---- End output of "bash" "/tmp/chef-script20150507-25183-qth6vl" ----
==> fhcap-asaleh-multi-node1: Ran "bash" "/tmp/chef-script20150507-25183-qth6vl" returned 1
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: Resource Declaration:
==> fhcap-asaleh-multi-node1: ---------------------
==> fhcap-asaleh-multi-node1: # In /var/chef/cache/cookbooks/feedhenry_galera/recipes/server.rb
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: 87: bash "secure-mysql" do
==> fhcap-asaleh-multi-node1: 88: user "root"
==> fhcap-asaleh-multi-node1: 89: code <<-EOH
==> fhcap-asaleh-multi-node1: 90: #{node['mysql']['mysql_bin']} -uroot -h127.0.0.1 -e "DROP DATABASE IF EXISTS test; DELETE FROM mysql.db WHERE DB='test' OR DB='test\\_%'"
==> fhcap-asaleh-multi-node1: 91: #{node['mysql']['mysql_bin']} -uroot -h127.0.0.1 -e "UPDATE mysql.user SET Password=PASSWORD('#{node['mysql']['server_root_password']}') WHERE User='root'; DELETE FROM mysql.user WHERE User=''; DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); FLUSH PRIVILEGES;"
==> fhcap-asaleh-multi-node1: 92: EOH
==> fhcap-asaleh-multi-node1: 93: only_if { node['feedhenry_galera']['secure'] == 'yes' && !FileTest.exists?("#{install_flag}") }
==> fhcap-asaleh-multi-node1: 94: end
==> fhcap-asaleh-multi-node1: 95:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: Compiled Resource:
==> fhcap-asaleh-multi-node1: ------------------
==> fhcap-asaleh-multi-node1: # Declared in /var/chef/cache/cookbooks/feedhenry_galera/recipes/server.rb:87:in `from_file'
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: bash("secure-mysql") do
==> fhcap-asaleh-multi-node1: action "run"
==> fhcap-asaleh-multi-node1: retries 0
==> fhcap-asaleh-multi-node1: retry_delay 2
==> fhcap-asaleh-multi-node1: command "\"bash\" \"/tmp/chef-script20150507-25183-qth6vl\""
==> fhcap-asaleh-multi-node1: backup 5
==> fhcap-asaleh-multi-node1: returns 0
==> fhcap-asaleh-multi-node1: user "root"
==> fhcap-asaleh-multi-node1: code " /usr/local/mysql/bin/mysql -uroot -h127.0.0.1 -e \"DROP DATABASE IF EXISTS test; DELETE FROM mysql.db WHERE DB='test' OR DB='test\\_%'\"\n /usr/local/mysql/bin/mysql -uroot -h127.0.0.1 -e \"UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root'; DELETE FROM mysql.user WHERE User=''; DELETE FROM mysql.user WHERE User='root
' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); FLUSH PRIVILEGES;\"\n"
==> fhcap-asaleh-multi-node1: interpreter "bash"
==> fhcap-asaleh-multi-node1: cookbook_name "feedhenry_galera"
==> fhcap-asaleh-multi-node1: recipe_name "server"
==> fhcap-asaleh-multi-node1: only_if { #code block }
==> fhcap-asaleh-multi-node1: end
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1:
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:24+00:00] INFO: Running queued delayed notifications before re-raising exception
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:24+00:00] INFO: template[/etc/ntp.conf] sending restart action to service[ntp] (delayed)
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:26+00:00] INFO: service[ntp] restarted
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:26+00:00] INFO: template[/etc/nagios/nrpe.cfg] sending restart action to service[nagios-nrpe-server] (delayed)
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:27+00:00] INFO: service[nagios-nrpe-server] restarted
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:27+00:00] INFO: template[/etc/munin/munin-node.conf] sending restart action to service[munin-node] (delayed)
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] INFO: service[munin-node] restarted
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] INFO: template[my.cnf] sending restart action to service[mysql] (delayed)
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] ERROR: Running exception handlers
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] ERROR: Exception handlers complete
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] INFO: Sending resource update report (run-id: 9dfbe869-7c63-431e-a0a6-8fb86f267660)
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] ERROR: bash[secure-mysql] (feedhenry_galera::server line 87) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
==> fhcap-asaleh-multi-node1: ---- Begin output of "bash" "/tmp/chef-script20150507-25183-qth6vl" ----
==> fhcap-asaleh-multi-node1: STDOUT:
==> fhcap-asaleh-multi-node1: STDERR: ERROR 1175 (HY000) at line 1: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
==> fhcap-asaleh-multi-node1: ERROR 1175 (HY000) at line 1: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
==> fhcap-asaleh-multi-node1: ---- End output of "bash" "/tmp/chef-script20150507-25183-qth6vl" ----
==> fhcap-asaleh-multi-node1: Ran "bash" "/tmp/chef-script20150507-25183-qth6vl" returned 1
==> fhcap-asaleh-multi-node1: [2015-05-07T12:00:28+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment