Ask Your Question
1

mysql::server class override_options don't take effect with a restart.

asked 2014-09-17 07:55:15 -0500

vang gravatar image

Hi,

The override_options below do not take effect until I manually restart the mysql service after provisioning. Should the mysql::server class not notify the mysql service after doing the override changes or have I missed something? I'm applying this to a docker container and have set the service provider to base as a work around for the upstart issues so wonder if this is changing behavior of the class?

  class { '::mysql::server':
    service_provider => base,
    databases        => $databases,
    users            => $users,
    grants           => $grants,
    remove_default_accounts => true,
    override_options => {
      mysqld => {
        "bind_address" => "0.0.0.0",
      }
    },}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-17 10:43:04 -0500

ramindk gravatar image

Because Mysql is a data service it appears that the module writers made the decision to not restart the Mysql service when the config changes. That's a decision I agree with particularly when restarting a db can break other services in your system.

If you look at the params.pp you'll see that restart is set to false. When you declare mysql::server you'll need to change that. In your case it'll look like,

class { '::mysql::server':
  service_provider => base,
  databases        => $databases,
  users            => $users,
  grants           => $grants,
  restart          => true, # will restart the service when *any* my.cnf is made.
  remove_default_accounts => true,
  override_options => {
    mysqld => {
      "bind_address" => "0.0.0.0",
    }
  },
}
edit flag offensive delete link more

Comments

Doh! Don't know how I managed to miss that. Thanks.

vang gravatar imagevang ( 2014-09-22 08:01:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-17 07:55:15 -0500

Seen: 375 times

Last updated: Sep 17 '14