sous-chefs / mysql

Development repository for the mysql cookbook
https://supermarket.chef.io/cookbooks/mysql
Apache License 2.0
338 stars 690 forks source link

/etc/init.d/mysqld getting created along with /etc/init.d/mysql-sample if sysvinit is used #506

Closed AjeetK closed 4 years ago

AjeetK commented 7 years ago

Cookbook version

8.2

Chef-client version

12.18.31

Platform Details

centos-6.8

Scenario:

Following recipe results into creation of /etc/init.d/mysqld and /etc/init.d/mysql-sample

include_recipe 'yum-mysql-community::mysql55'
mysql_service 'sample' do
  port '3307'
  version '5.5'
  run_user 'mysql'
  data_dir '/vol/mysql'
  service_manager 'sysvinit'
  action [:create, :start]
end

Steps to Reproduce:

use the above recipe

Expected Result:

/etc/init.d/mysqld should not get created as if somebody runs sudo service mysqld start then one more mysql process will start along with a process already running with /etc/init.d/mysql-sample.

Actual Result:

Either /etc/init.d/mysqld or /etc/init.d/mysql-sample should get created.

nkadel-skyhook commented 7 years ago

The "/etc/init.d/mysqld" is probably created by the original RPM or similar package installation. It should be flushed or ideally disabled by chef if it exists from an RPM installation. at least until or unless the "crate an instance of mysql" is reconfigured to allow it to not have a null instance name.

github-actions[bot] commented 4 years ago

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

ramereth commented 4 years ago

We are no longer supporting operating systems which still use sysvinit.