-
Notifications
You must be signed in to change notification settings - Fork 795
Completely redesign the MySQL module. #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This initial round of work focuses on adding the concept of mysql::globals to the module. This is a shared place to provide all the data the module needs, and then clients, servers, and providers can all rely on this information to set things up. This is being primarily used at first to allow a default_options hash that contains all the previous parameters and takes a overrides_options that allows you to then further customize any of the options in my.cnf.
This work adds a new mysql::globals class which contains a hash used to build my.cnf from. It's used to share this data across multiple classes so that the client and server can share this data. End users can modify content in my.cnf by including mysql::globals and passing in override_options as a hash that looks like: override_options = { 'mysqld' => { 'max_connections' => '120' } } This completely replaces the mess of parameters that existed in the main mysql class before. Completely refactor mysql::server and rework the API. This changes ordering, changes from execs{} to mysql_user for the root password, removes some functionality (like the etc_root_password), and generally makes some tough decisions about how mysql::server should be built.
to the hash used in mysql::globals.
This is used in the backwards compatibility code in init.pp.
This removes all the internal class parameters and shrinks these classes to be more straightforward, relying on the values set in bindings.pp.
Handful of changes here, such as removing flush (so that mysql_user can be used for root password changes) and other tweaks here. Add time option to mysql::backup.
Not sure if I have made this request before, but can we get a 1.0.0 release before these API changes? Dependent module authors will sing your praises. |
Yeah we definitely can, I want this to be handled carefully as it's such a nightmarishly large change. It won't even go in unless the community decides it's an improvement. I'll probably release a 1.0.0, AND create a 1.0.0 branch so that we can continue to bugfix off that branch. |
+1 for a 1.0.0 branch for dependent module rspec tests. |
Add a backwards compatibility section and a conf.d section.
Completely redesign the MySQL module.
This work completely overhauls the MySQL module.
Warning
I've been working on this for a week now, testing in a local vagrant instance. I don't have large scale MySQL environments to test upgrades from, I don't have clusters, I don't have sophisicated use cases for MySQL. This rewrite is currently LIGHTLY tested and the goal of merging it into master is to increase the pool of people who can help me test it, find the design flaws, add features, and generally get this into shape for a release. It is NOT ready to be released yet and I know that and need help to get it there.
Overview
In an attempt to improve this module, make it easier to extend in future, and provide a better foundation for feature development I have attempted to refactor it completely.
Pretty much every API and class has been modified in some way. The heart of this proposed refactor is the idea that "It is impossible to adequately represent my.cnf through parameters." Previously we allowed you to set parameters like max_connections but then used that value in all my.cnf sections, and as experienced mysql users will tell you that can be unhelpful. You want different settings in
mysqldump
than inmysqld
and this work supports that.If you wish to customize my.cnf in this work you do:
As you can see the hash for options is basically a bunch of top level sections as keys, then subhashes which contain the values under those sections.
mysql::server changes
remove_default_accounts
added as a parameter to automatically include mysql::server::account_security{}Other Changes
enable_bindings
to automatically get -all- the bindings if you're feeling lazy.