Closed 501st-alpha1 closed 9 years ago
I also tried setting the root password to an empty string, by modifying my Vagrantfile
as follows:
config.vm.provision "chef_solo" do |chef|
chef.add_recipe "mysqld"
chef.json = {
"mysqld" => {
"root_password" => ""
}
}
end
But when I did that, it errored on trying to restart mysql
:
==> default: ================================================================================
==> default: Error executing action `restart` on resource 'service[mysql]'
==> default: ================================================================================
==> default:
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default:
==> default: ---- Begin output of /etc/init.d/mysql stop ----
==> default:
==> default: STDOUT: Stopping MySQL database server: mysqld failed!
==> default:
==> default: STDERR:
==> default:
==> default: ---- End output of /etc/init.d/mysql stop ----
==> default:
==> default: Ran /etc/init.d/mysql stop returned 1
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/82891d35d286774d89cfbe3b7a9ea9d4/cookbooks/mysqld/providers/default.rb
==> default:
==> default:
==> default:
==> default: 48: service new_resource.service_name do
==> default:
==> default: 49: # Use --wsrep-new-cluster if this is an initial galera startup
==> default:
==> default: 50: if new_resource.galera_init
==> default:
==> default: 51: start_command "service #{new_resource.service_name} start --wsrep-new-cluster --wsrep_cluster_address=gcomm://"
==> default:
==> default: 52: end
==> default:
==> default: 53:
==> default:
==> default:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/82891d35d286774d89cfbe3b7a9ea9d4/cookbooks/mysqld/providers/default.rb:48:in `block in class_from_file'
==> default:
==> default: service("mysql") do
==> default: action [:enable, :start]
==> default: supports {:restart=>false, :reload=>false, :status=>false}
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: service_name "mysql"
==> default: enabled true
==> default: running true
==> default: pattern "mysql"
==> default: declared_type :service
==> default: cookbook_name :mysqld
==> default: not_if { #code block }
==> default: end
==> default:
==> default: [2015-03-26T21:44:16+00:00] ERROR: Running exception handlers
==> default: [2015-03-26T21:44:16+00:00] ERROR: Exception handlers complete
==> default: [2015-03-26T21:44:16+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-03-26T21:44:16+00:00] ERROR: service[mysql] (/tmp/vagrant-chef/82891d35d286774d89cfbe3b7a9ea9d4/cookbooks/mysqld/providers/default.rb line 48) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of /etc/init.d/mysql stop ----
==> default: STDOUT: Stopping MySQL database server: mysqld failed!
==> default: STDERR:
==> default: ---- End output of /etc/init.d/mysql stop ----
==> default: Ran /etc/init.d/mysql stop returned 1
I also couldn't manage to login to MySQL after that, with or without a password.
Closing in favor of the pull request.
I'm trying to use this cookbook with Vagrant, but I can't get it to allow the MySQL user
root
to have no password. I addedcookbook "mysqld"
to myCheffile
, and the following to myVagrantfile
:But when I do
vagrant up
, the Chef configuration fails. Here is the relevant output:The documentation mentions that the root password will be set if given, so I don't see why the argument is required.
Any thoughts?