puppetlabs / puppetlabs-mysql

MySQL Puppet Module / Manifests + Types & Providers
Apache License 2.0
380 stars 790 forks source link

Add support for ALL grant on mysql >= 8.0.33 #1618

Open alaunay opened 7 months ago

alaunay commented 7 months ago

Summary

This patch add ALL grant support for mysql >= 8.0.33, due tot the recent addition of the new TELEMETRY_LOG_ADMIN, see: https://docs.oracle.com/cd/E17952_01/mysql-8.0-relnotes-en/news-8-0-33.html#mysqld-8-0-33-feature

Additional Context

Add any additional context about the problem here.

Puppet changes grant at each run:

Notice: /Stage[main]/Mysql::Server::Providers/Mysql_grant[XXX@YYY/*.*]/privileges: privileges changed ['ALL', 'APPLICATION_PASSWORD_ADMIN', 'AUDIT_ABORT_EXEMPT', 'AUDIT_ADMIN', 'AUTHENTICATION_POLICY_ADMIN', 'BACKUP_ADMIN', 'BINLOG_ADMIN', 'BINLOG_ENCRYPTION_ADMIN', 'CLONE_ADMIN', 'CONNECTION_ADMIN', 'ENCRYPTION_KEY_ADMIN', 'FIREWALL_EXEMPT', 'FLUSH_OPTIMIZER_COSTS', 'FLUSH_STATUS', 'FLUSH_TABLES', 'FLUSH_USER_RESOURCES', 'GROUP_REPLICATION_ADMIN', 'GROUP_REPLICATION_STREAM', 'INNODB_REDO_LOG_ARCHIVE', 'INNODB_REDO_LOG_ENABLE', 'PASSWORDLESS_USER_ADMIN', 'PERSIST_RO_VARIABLES_ADMIN', 'REPLICATION_APPLIER', 'REPLICATION_SLAVE_ADMIN', 'RESOURCE_GROUP_ADMIN', 'RESOURCE_GROUP_USER', 'ROLE_ADMIN', 'SENSITIVE_VARIABLES_OBSERVER', 'SERVICE_CONNECTION_ADMIN', 'SESSION_VARIABLES_ADMIN', 'SET_USER_ID', 'SHOW_ROUTINE', 'SYSTEM_USER', 'SYSTEM_VARIABLES_ADMIN', 'TABLE_ENCRYPTION_ADMIN', 'TELEMETRY_LOG_ADMIN', 'XA_RECOVER_ADMIN'] to ['ALL'] (corrective)

Add the new TELEMETRY_LOG_ADMIN, according to previous code.

Related Issues (if any)

Issue #1474 #1502 #1503

Checklist

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.

fraenki commented 5 months ago

So much looking forward to this! (FWIW, this is also causing issues when performing long-running schema changes.)

@Ramesh7, maybe if you find some time, would you have a look at this please? Thanks :)

MarcWort commented 1 month ago

Any progress in reviewing that PR?

fraenki commented 3 weeks ago

ping @puppetlabs