diff --git a/releasenotes/notes/fixes-mariadb-config-groups-b5fa4f44a8ed7b85.yaml b/releasenotes/notes/fixes-mariadb-config-groups-b5fa4f44a8ed7b85.yaml new file mode 100644 index 0000000000..7ef48be1e5 --- /dev/null +++ b/releasenotes/notes/fixes-mariadb-config-groups-b5fa4f44a8ed7b85.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - MariaDB historically leveraged the mysql manager for guest + support including the configuration groups implementation. + With MariaDB now having its own manager class that inherits + from Mysql, it needs to have validation_rules and a + ConfigParser setup. Bug 1532256 diff --git a/trove/common/template.py b/trove/common/template.py index 6083f60b07..28b29db697 100644 --- a/trove/common/template.py +++ b/trove/common/template.py @@ -33,6 +33,7 @@ SERVICE_PARSERS = { 'mongodb': configurations.MongoDBConfParser, 'mysql': configurations.MySQLConfParser, 'percona': configurations.MySQLConfParser, + 'mariadb': configurations.MySQLConfParser, 'postgresql': configurations.PostgresqlConfParser, 'cassandra': configurations.CassandraConfParser, 'redis': configurations.RedisConfParser, diff --git a/trove/templates/mariadb/validation-rules.json b/trove/templates/mariadb/validation-rules.json new file mode 100644 index 0000000000..c5c4111c5a --- /dev/null +++ b/trove/templates/mariadb/validation-rules.json @@ -0,0 +1,236 @@ +{ + "configuration-parameters": [ + { + "name": "innodb_file_per_table", + "restart_required": false, + "max": 1, + "min": 0, + "type": "integer" + }, + { + "name": "autocommit", + "restart_required": false, + "max": 1, + "min": 0, + "type": "integer" + }, + { + "name": "local_infile", + "restart_required": false, + "max": 1, + "min": 0, + "type": "integer" + }, + { + "name": "lower_case_table_names", + "restart_required": true, + "max": 2, + "min": 0, + "type": "integer" + }, + { + "name": "key_buffer_size", + "restart_required": false, + "max": 4294967295, + "min": 8, + "type": "integer" + }, + { + "name": "connect_timeout", + "restart_required": false, + "max": 31536000, + "min": 2, + "type": "integer" + }, + { + "name": "join_buffer_size", + "restart_required": false, + "max": 18446744073709547520, + "min": 128, + "type": "integer" + }, + { + "name": "sort_buffer_size", + "restart_required": false, + "max": 18446744073709551615, + "min": 32768, + "type": "integer" + }, + { + "name": "innodb_buffer_pool_size", + "restart_required": true, + "max": 18446744073709551615, + "min": 5242880, + "type": "integer" + }, + { + "name": "innodb_flush_log_at_trx_commit", + "restart_required": false, + "max": 2, + "min": 0, + "type": "integer" + }, + { + "name": "innodb_log_buffer_size", + "restart_required": true, + "max": 4294967295, + "min": 262144, + "type": "integer" + }, + { + "name": "innodb_open_files", + "restart_required": true, + "max": 4294967295, + "min": 10, + "type": "integer" + }, + { + "name": "innodb_thread_concurrency", + "restart_required": false, + "max": 1000, + "min": 0, + "type": "integer" + }, + { + "name": "sync_binlog", + "restart_required": false, + "max": 4294967295, + "min": 0, + "type": "integer" + }, + { + "name": "auto_increment_increment", + "restart_required": false, + "max": 65535, + "min": 1, + "type": "integer" + }, + { + "name": "auto_increment_offset", + "restart_required": false, + "max": 65535, + "min": 1, + "type": "integer" + }, + { + "name": "bulk_insert_buffer_size", + "restart_required": false, + "max": 18446744073709551615, + "min": 0, + "type": "integer" + }, + { + "name": "expire_logs_days", + "restart_required": false, + "max": 99, + "min": 0, + "type": "integer" + }, + { + "name": "interactive_timeout", + "restart_required": false, + "max": 65535, + "min": 1, + "type": "integer" + }, + { + "name": "max_allowed_packet", + "restart_required": false, + "max": 1073741824, + "min": 1024, + "type": "integer" + }, + { + "name": "max_connect_errors", + "restart_required": false, + "max": 18446744073709551615, + "min": 1, + "type": "integer" + }, + { + "name": "max_connections", + "restart_required": false, + "max": 100000, + "min": 1, + "type": "integer" + }, + { + "name": "myisam_sort_buffer_size", + "restart_required": false, + "max": 18446744073709551615, + "min": 4096, + "type": "integer" + }, + { + "name": "max_user_connections", + "restart_required": false, + "max": 4294967295, + "min": 0, + "type": "integer" + }, + { + "name": "server_id", + "restart_required": false, + "max": 4294967295, + "min": 0, + "type": "integer" + }, + { + "name": "wait_timeout", + "restart_required": false, + "max": 31536000, + "min": 1, + "type": "integer" + }, + { + "name": "character_set_client", + "restart_required": false, + "type": "string" + }, + { + "name": "character_set_connection", + "restart_required": false, + "type": "string" + }, + { + "name": "character_set_database", + "restart_required": false, + "type": "string" + }, + { + "name": "character_set_filesystem", + "restart_required": false, + "type": "string" + }, + { + "name": "character_set_results", + "restart_required": false, + "type": "string" + }, + { + "name": "character_set_server", + "restart_required": false, + "type": "string" + }, + { + "name": "collation_connection", + "restart_required": false, + "type": "string" + }, + { + "name": "collation_database", + "restart_required": false, + "type": "string" + }, + { + "name": "collation_server", + "restart_required": false, + "type": "string" + }, + { + "name": "performance_schema", + "restart_required": true, + "type": "boolean" + } + ] +} diff --git a/trove/tests/scenario/helpers/mariadb_helper.py b/trove/tests/scenario/helpers/mariadb_helper.py index 687b87631a..1a4b94598b 100644 --- a/trove/tests/scenario/helpers/mariadb_helper.py +++ b/trove/tests/scenario/helpers/mariadb_helper.py @@ -20,14 +20,3 @@ class MariadbHelper(MysqlHelper): def __init__(self, expected_override_name): super(MariadbHelper, self).__init__(expected_override_name) - - # Mariadb currently does not support configuration groups. - # see: bug/1532256 - def get_dynamic_group(self): - return dict() - - def get_non_dynamic_group(self): - return dict() - - def get_invalid_groups(self): - return []