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
When using the mysql_service resource with a different name than default, although the Chef converge phase exits successfully, the MySQL service is not able to start.
⚠️ This only happens with Dokken based kitchens, not with Vagrant.
apt_update'all platforms'doaction:updateonly_if{platform_family?('debian')}endyum_mysql_community_repo'mysql_repo'doversionnode['scalefast_mysql']['service']['version']only_if{platform_family?('rhel') || platform_family?('amazon')}end# Copy pasted from the README.mdmysql_service'foo'doport'3306'version'8.0'initial_root_password'change me'action[:create,:start]end
Converge
Use kitchen login to go inside the system
Confirm that MySQL is dead:
root@dokken:/# systemctl status mysql-foo.service
● mysql-foo.service - mysql_service[mysql-foo]
Loaded: loaded (/etc/systemd/system/mysql-foo.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-03-21 13:20:12 UTC; 22s ago
Process: 1006 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 1014 ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql-foo/my.cnf --basedir=/usr (code=exited, status=1/FAILURE)
Process: 1015 ExecStartPost=/usr/share/mysql/mysql-systemd-start (code=exited, status=0/SUCCESS)
Main PID: 1014 (code=exited, status=1/FAILURE)
Mar 21 13:20:12 dokken systemd[1]: mysql-foo.service: Scheduled restart job, restart counter is at 5.
Mar 21 13:20:12 dokken systemd[1]: Stopped mysql_service[mysql-foo].
Mar 21 13:20:12 dokken systemd[1]: mysql-foo.service: Start request repeated too quickly.
Mar 21 13:20:12 dokken systemd[1]: mysql-foo.service: Failed with result 'exit-code'.
Mar 21 13:20:12 dokken systemd[1]: Failed to start mysql_service[mysql-foo].
🚓 Expected behavior
MySQL service should be running.
➕ Additional context
The problem seems to be a permission's issue, since when running MySQL manually with /usr/sbin/mysqld --defaults-file=/etc/mysql-foo/my.cnf --basedir=/usr the output is:
root@dokken:/# /usr/sbin/mysqld --defaults-file=/etc/mysql-foo/my.cnf --basedir=/usr
mysqld: [ERROR] Failed to open required defaults file: /etc/mysql-foo/my.cnf
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
I have confirmed that this behavior does not occur when the mysql_service is just named default.
The text was updated successfully, but these errors were encountered:
👻 Brief Description
When using the
mysql_service
resource with a different name thandefault
, although the Chef converge phase exits successfully, the MySQL service is not able to start.🥞 Cookbook version
10.1.1
👩🍳 Chef-Infra Version
16.11.7
🎩 Platform details
Dokken Ubuntu 20.04 (see used kitchen YAML file)
Steps To Reproduce
kitchen login
to go inside the system🚓 Expected behavior
MySQL service should be running.
➕ Additional context
The problem seems to be a permission's issue, since when running MySQL manually with
/usr/sbin/mysqld --defaults-file=/etc/mysql-foo/my.cnf --basedir=/usr
the output is:I have confirmed that this behavior does not occur when the
mysql_service
is just nameddefault
.The text was updated successfully, but these errors were encountered: