Skip to content

(MODULES-6875,MODULES-7487) - Fix mariadb mysql_user password idempotency #1195

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

Merged
merged 1 commit into from
May 29, 2019

Conversation

alexjfisher
Copy link
Collaborator

The change introduced in mariadb 10.2.16 (and 10.3.8) where:

the SET PASSWORD command stores user passwords
in the mysql_native_password plugin authentication_string instead of
in the password column

was addressed in #1135

This behaviour was short-lived. In 10.2.19 and 10.3.11 the old
behaviour was restored.

The fix in the commit dd6e74c62a2 made sure that the password field is always set, because that was the original issue that broke third-party tools.

See https://jira.mariadb.org/browse/MDEV-16774

This commit is based on
https://tickets.puppetlabs.com/browse/MODULES-6875?focusedCommentId=645260&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-645260

…ency

The change introduced in mariadb 10.2.16 (and 10.3.8) where:

> the `SET PASSWORD` command stores user passwords
in the `mysql_native_password` plugin `authentication_string` instead of
in the `password` column

was addressed in puppetlabs#1135

This behaviour was short-lived.  In 10.2.19 and 10.3.11 the old
behaviour was restored.

> The fix in the commit dd6e74c62a2 made sure that the password field is always set, because that was the original issue that broke third-party tools.

See https://jira.mariadb.org/browse/MDEV-16774

This commit is based on
https://tickets.puppetlabs.com/browse/MODULES-6875?focusedCommentId=645260&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-645260
@eimlav
Copy link
Contributor

eimlav commented May 20, 2019

Hi @alexjfisher . I have come across this same issue while adding RedHat 8 support for the module.

I ran your fix through adhoc and it worked fine however when I ran against RedHat 8 (which is using MariaDB 10.3.10) the idempotency issues still occured. I added the COALESCE function suggested in MODULES-7487 and this appears to have fixed the failing tests.

Would it therefore be possible to add the COALESCE function at https://github.com/puppetlabs/puppetlabs-mysql/pull/1195/files#diff-c6c504610358af96dcf6e3372321e142R21 ? Cheers!

@eimlav eimlav added the bugfix label May 20, 2019
@bodik
Copy link
Contributor

bodik commented May 21, 2019

Would it therefore be possible to add the COALESCE function at https://github.com/puppetlabs/puppetlabs-mysql/pull/1195/files#diff-c6c504610358af96dcf6e3372321e142R21 ? Cheers!

there should be either solution based on version pinning OR the COALESCE, but not the both to keep code somewhat clear

@alexjfisher
Copy link
Collaborator Author

@eimlav Is this with RHEL-8 beta? I'm wondering if they backported the fix into the 10.3.10 rpm??

The final release of RHEL 8 actually ships with 10.3.11, so maybe this isn't a problem after all?

@eimlav
Copy link
Contributor

eimlav commented May 23, 2019

@alexjfisher Ah I see. I'll see if I can try it out on a released version of RHEL8. Thanks for the info!

@eimlav
Copy link
Contributor

eimlav commented May 29, 2019

@alexjfisher Tested out your changes on GA RHEL8 and they passed. Nice work!

@eimlav eimlav merged commit c7da528 into puppetlabs:master May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants