You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The converge to successfully complete and start the mariadb service.
➕ Additional context
Believe the issue lies in the helper.rb file (186-188) where it is hardcoded to return the platform_service_name as mysql:
def platform_service_name(_version = node.run_state['mariadb']['version'])
'mysql'
end
This should by mariadb for CentOS7 (not sure for other platforms), such as:
def platform_service_name
case node['platform_family']
when 'rhel'
'mariadb'
else
'mysql'
end
end
This is the specific error:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /bin/systemctl --system enable mysql ----
STDOUT:
STDERR: Failed to execute operation: No such file or directory
---- End output of /bin/systemctl --system enable mysql ----
Ran /bin/systemctl --system enable mysql returned 1
👻 Brief Description
A recipe is not converging under Kitchen when the underlying OS is CentOS7 (works fine in CentOS6.9).
The recipe performs a simple install:
The cookbook installs the correct version of MariaDB using the default :install action:
But when the :create action is called, it fails on the
Error executing action 'enable' on resource 'service[mysql]'
The reason for this is that the MariaDB service under CentOS7 is called
mariadb
(notmysql
as in CentOS6)It will also
enable
andstart
correctly when called manually:🥞 Cookbook version
Cookbook Version: 3.1.0
👩🍳 Chef-Infra Version
Chef Client version 14.14.29-1
🎩 Platform details
OS Version: CentOS Linux release 7.6.1810 (Core)
Steps To Reproduce
Steps to reproduce the behaviour:
Create a database recipe as above, and kitchen converge a test machine under CentOS7. Kitchen file:
🚓 Expected behavior
The converge to successfully complete and start the
mariadb
service.➕ Additional context
Believe the issue lies in the helper.rb file (186-188) where it is hardcoded to return the
platform_service_name
asmysql
:This should by
mariadb
for CentOS7 (not sure for other platforms), such as:This is the specific error:
This is the error trace from the converge:
ErrorTrace.txt
The text was updated successfully, but these errors were encountered: