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
Currently this module requires two executions of `puppet apply` to properly configure MySQL. On an Ubuntu 16.04 instance, I am seeing the second Puppet run produce the following changes:
```
Notice: Compiled catalog for ubuntu-16.04-x64 in environment production in 1.93 seconds
Info: Applying configuration version '1504824440'
Info: Computing checksum on file /etc/mysql/conf.d/mysql.cnf
Info: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d/mysql.cnf]: Filebucketed /etc/mysql/conf.d/mysql.cnf to puppet with sum c992f7b57d778f607e8d83792936e92b
Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d/mysql.cnf]/ensure: removed
Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/ensure: defined content as '{md5}59e52aeed142f9004c9e74ff5e4f1d84'
Info: Class[Mysql::Server::Config]: Scheduling refresh of Class[Mysql::Server::Service]
Info: Class[Mysql::Server::Service]: Scheduling refresh of Service[mysqld]
Info: Class[Mysql::Server::Service]: Scheduling refresh of Exec[wait_for_mysql_socket_to_open]
Notice: /Stage[main]/Mysql::Server::Service/Service[mysqld]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Mysql::Server::Service/Exec[wait_for_mysql_socket_to_open]: Triggered 'refresh' from 1 events
Notice: Applied catalog in 2.49 seconds
```
The problem is that `Class['mysql::server::config']` is included before `Class['mysql::server::install']`. This means that `/etc/mysql/my.cnf` is configured first, but then subsequently overridden by the default configuration that is installed by the `mysql-server` package. This isn't picked up by the existing acceptance tests because they explicitly set `config_file` to `'#{@tmpdir}/my.cnf`.
0 commit comments