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

mysql_user: fix idempotence check for ALL GRANT In MySQL 8.0 #52469

Open
wants to merge 7 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@azeliashchonak
Copy link

azeliashchonak commented Feb 18, 2019

SUMMARY

In MySQL 8.0 SHOW GRANTS no longer displays ALL PRIVILEGES in its global-privileges output. Instead, SHOW GRANTS explicitly lists each granted global privilege. The issue is that the mysql_user module is using a simple comparison between new and current privileges and if we define ".:ALL,GRANT" it will return changed, because "ALL" != list_of_privileges, so idempotence check will be failed.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

mysql_user

ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

@azeliashchonak azeliashchonak changed the title [WIP] mysql_user: fix idempotence check for ALL GRANT In MySQL 8.0 mysql_user: fix idempotence check for ALL GRANT In MySQL 8.0 Feb 18, 2019

@ansibot ansibot added community_review and removed WIP labels Feb 18, 2019

@Xyon

This comment has been minimized.

Copy link
Contributor

Xyon commented Feb 20, 2019

Code LGTM, not tested however.

@azeliashchonak

This comment has been minimized.

Copy link
Author

azeliashchonak commented Feb 21, 2019

ready_for_review

@bmalynovytch

This comment has been minimized.

Copy link

bmalynovytch commented Feb 21, 2019

@azeliashchonak I'm waiting for my own PR to be merged, because you'll need to rebase / rework it.
I'll review (flag for shipping) as soon as the merge + rebase will be ok

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 22, 2019

@azeliashchonak this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

azeliashchonak added some commits Feb 18, 2019

@azeliashchonak azeliashchonak force-pushed the azeliashchonak:idempotence-all-grant branch from b53a803 to 8dff727 Feb 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 22, 2019

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/database/mysql/mysql_user.py:656:0: missing-final-newline Final newline missing
lib/ansible/modules/database/mysql/mysql_user.py:656:0: mixed-line-endings Mixed line endings LF and CRLF

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/database/mysql/mysql_user.py:656:11: W292 no newline at end of file

click here for bot help

@azeliashchonak

This comment has been minimized.

Copy link
Author

azeliashchonak commented Feb 22, 2019

ready_for_review

@tgadiev

This comment has been minimized.

Copy link

tgadiev commented Feb 22, 2019

@bmalynovytch can you pls take a look?

@bmalynovytch

This comment has been minimized.

Copy link

bmalynovytch commented Feb 22, 2019

Still waiting for #45355 to be merged before.
We need more people testing and reviewing it before it gets merged.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 2, 2019

@ansibot ansibot added the stale_ci label Mar 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.