You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mysql_user.present does not work with MySQL 5.7 #29265
Execution-ModuleP2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Salt: 2015.5.6Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)Jinja2: 2.8M2Crypto: 0.20.2msgpack-python: 0.4.6msgpack-pure: Not Installedpycrypto: 2.6.1libnacl: Not InstalledPyYAML: 3.11ioflo: Not InstalledPyZMQ: 14.5.0RAET: Not InstalledZMQ: 4.0.5Mako: Not InstalledTornado: Not Installedtimelib: 0.2.4dateutil: Not Installed
@michalsuba@rallytime
Used password_column set to auth string. It works for a new user, but does not work for password changes on exisiting users. I've changed password for mysql-test user and ran state again:
[DEBUG ] Doing query: SELECT User,Host FROM mysql.user WHERE User = %(user)s AND Host = %(host)s AND authentication_string = %(password)s args: {'host': 'localhost', 'password': '*AB5185559FB7492CD44D9C83FC92AFC184309AFD', 'user': 'mysql-test'}
[DEBUG ] Doing query: SELECT User,Host FROM mysql.user WHERE User = %(user)s AND Host = %(host)s args: {'host': 'localhost', 'user': 'mysql-test'}
[DEBUG ] Doing query: UPDATE mysql.user SET password=%(password)s WHERE User=%(user)s AND Host = %(host)s; args: {'host': 'localhost', 'password': '*AB5185559FB7492CD44D9C83FC92AFC184309AFD', 'user': 'mysql-test'}
[ERROR ] MySQL Error 1054: Unknown column 'password' in 'field list'
[ERROR ] Failed to change password for user mysql-test@localhost (MySQL Error 1054: Unknown column 'password' in 'field list')
@mbochenk Just to clarify...did you test both of the pull requests from @michalsuba above, or just the first one? I am trying to gauge if more work is needed here, or if the second PR takes care of the issue with using password changes on existing users.
@mbochenk Hrm...Both commits should be merged into both the 2016.3 and develop branches. If you want to wait to test this when the next feature release comes out, that is totally fine, too.
Will it be possible to specify the password_column globally in /etc/salt/minion?
e.g. mysql.password_column: 'authentication_string'
For minions were all states run against 5.7+, it'd be easier to manage rather than having conditional logic in all individual states.
I'm guessing that would mean that we would have to check **connection_args if password_column is defined.
Turns out I fixed the module without checking the mysql_user state that depends on it, which was still defaulting to an explicit column name and passing it through to the module, instead of letting the module pick a default. Hopefully PR #33690 should take care of it - I tested the state this time and the fix works on my end.
Execution-ModuleP2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
mbochenk commentedon Nov 30, 2015
Packages installed:
jfindlay commentedon Dec 1, 2015
@mbochenk, thanks for the report.
Merge pull request #30603 from michalsuba/patch-1
rallytime commentedon Jan 26, 2016
@mbochenk This looks to be fixed by #30603. Are you in a position to give that a try?
mbochenk commentedon Jan 28, 2016
@rallytime not sure how to use it. Should I set password_column to "authentication_string" - or this should be Plugin?
rallytime commentedon Jan 28, 2016
@mbochenk After applying the change, I think you should be able to just run the state again, as is. Is that correct @michalsuba?
michalsuba commentedon Jan 28, 2016
@mbochenk @rallytime for old databases, it should run as is, on 5.7 it should by used with
at least that's the name of that column in my install of mysql5.7 , but .. :-)
to successfully run state like @mbochenk 's I needed to make 2 more changes: expose this parameter when calling from mysql_user and pass it after creation for verification).
https://github.com/saltstack/salt/pull/30708/files
https://github.com/saltstack/salt/pull/30709/files
mbochenk commentedon Jan 29, 2016
@michalsuba @rallytime
Used password_column set to auth string. It works for a new user, but does not work for password changes on exisiting users. I've changed password for mysql-test user and ran state again:
rallytime commentedon Feb 11, 2016
@mbochenk Just to clarify...did you test both of the pull requests from @michalsuba above, or just the first one? I am trying to gauge if more work is needed here, or if the second PR takes care of the issue with using password changes on existing users.
mbochenk commentedon Feb 12, 2016
@rallytime I tested commit f364fbf
mbochenk commentedon Feb 12, 2016
And commit 727c138 does not seem to be merged yet.
rallytime commentedon Feb 12, 2016
@mbochenk Hrm...Both commits should be merged into both the 2016.3 and develop branches. If you want to wait to test this when the next feature release comes out, that is totally fine, too.
steven-hadfield commentedon Mar 7, 2016
Will it be possible to specify the password_column globally in /etc/salt/minion?
e.g.
mysql.password_column: 'authentication_string'For minions were all states run against 5.7+, it'd be easier to manage rather than having conditional logic in all individual states.
I'm guessing that would mean that we would have to check
**connection_argsifpassword_columnis defined.rallytime commentedon Apr 28, 2016
This is fixed with #32440 and will be available in the upcoming 2016.3.0 release.
devster31 commentedon May 29, 2016
I'm still seeing this issue in
2016.3.0withMySQL 5.7, these are myversions-report:rallytime commentedon Jun 1, 2016
@neil-williamson Would it be possible for you to take another look here, based on the feedback from @devster31?
neil-williamson commentedon Jun 1, 2016
Turns out I fixed the module without checking the mysql_user state that depends on it, which was still defaulting to an explicit column name and passing it through to the module, instead of letting the module pick a default. Hopefully PR #33690 should take care of it - I tested the state this time and the fix works on my end.
devster31 commentedon Jun 2, 2016
I applied the patch on the minion and it seems to be fixed here too.
rallytime commentedon Jun 2, 2016
Excellent! Thanks for the quick fix @neil-williamson and for following up @devster31! I'll close this back up again as I just merged the fix.