Skip to content
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

[PR #338/1dcc5ec0 backport][stable-2] mysql_user: added flush privileges to write dynamic privs into db #339

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Apr 29, 2022

This is a backport of PR #338 as merged into main (1dcc5ec).

Fixes #120

SUMMARY

Added Flush Privileges after the revoke all privileges to write consitent the dynamic privileges which are required for cluster creation

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • mysql_user.py
  • user.py
  • privileges_revoke function
ADDITIONAL INFORMATION

Without this fix a user with all privileges is only on every second run allowed to create a cluster or replicaset on the host.
Mysqlsh with dba.checkInstanceConfiguration() is failing because these rights are missing:
CLONE_ADMIN, CONNECTION_ADMIN, GROUP_REPLICATION_ADMIN, PERSIST_RO_VARIABLES_ADMIN, REPLICATION_APPLIER, REPLICATION_SLAVE_ADMIN, ROLE_ADMIN, SYSTEM_VARIABLES_ADMIN
After a new run with priv: "*.*:ALL,GRANT" the dba.checkInstanceConfiguration() check is successfull.
More Details could be found in the issue #120

* added flush privileges to write dynamic privs into db
Fixes #120

* added changelog fragment

* Update changelogs/fragments/338-mysql_user_fix_missing_dynamic_privileges.yml

Co-authored-by: Andrew Klychkov <[email protected]>

Co-authored-by: Andrew Klychkov <[email protected]>
(cherry picked from commit 1dcc5ec)
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #339 (8d9a4ba) into stable-2 (d38813d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           stable-2     #339      +/-   ##
============================================
+ Coverage     75.76%   75.77%   +0.01%     
============================================
  Files            26       26              
  Lines          2290     2291       +1     
  Branches        541      556      +15     
============================================
+ Hits           1735     1736       +1     
  Misses          380      380              
  Partials        175      175              
Impacted Files Coverage Δ
plugins/module_utils/user.py 81.06% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d38813d...8d9a4ba. Read the comment docs.

@Andersson007 Andersson007 merged commit d61d442 into stable-2 Apr 29, 2022
@Andersson007 Andersson007 deleted the patchback/backports/stable-2/1dcc5ec086434e707d0ad122ffd9b612187b1132/pr-338 branch May 13, 2022 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants