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
2020-08-12 17:29:42,897 [salt.state :323 ][ERROR ][32435] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/state.py", line 1987, in call
ret = self.states[cdata['full']](*cdata['args'], **cdata['kwargs'])
File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2031, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/states/mysql_user.py", line 142, in present
**connection_args):
File "/usr/lib/python3.6/site-packages/salt/modules/mysql.py", line 1268, in user_exists
server_version = salt.utils.data.decode(version(**connection_args))
File "/usr/lib/python3.6/site-packages/salt/modules/mysql.py", line 860, in version
dbc = _connect(**connection_args)
File "/usr/lib/python3.6/site-packages/salt/modules/mysql.py", line 394, in _connect
dbc = MySQLdb.connect(**connargs)
File "/usr/lib64/python3.6/site-packages/MySQLdb/__init__.py", line 84, in Connect
return Connection(*args, **kwargs)
File "/usr/lib64/python3.6/site-packages/MySQLdb/connections.py", line 148, in __init__
for k, v in conv.items():
AttributeError: 'str' object has no attribute 'items'
when logging connargs in /usr/lib/python3.6/site-packages/salt/modules/mysql.py
it is shown as 'conv': '' this does not match the API descriptions in the mysqlclient 1.4.6 (which is in 15.2 and TW), which requires conv to be a dictionary.
The culprit seems to be
val = __salt__['config.option']('mysql.{0}'.format(name), None)
which returns an empty string instead of None so the check below is not catching that case. when we extend the check below with
if val is not None and val != '':
then the state works as expected.
The text was updated successfully, but these errors were encountered:
traceback
when logging connargs in /usr/lib/python3.6/site-packages/salt/modules/mysql.py
it is shown as
'conv': ''
this does not match the API descriptions in the mysqlclient 1.4.6 (which is in 15.2 and TW), which requires conv to be a dictionary.The culprit seems to be
which returns an empty string instead of None so the check below is not catching that case. when we extend the check below with
then the state works as expected.
The text was updated successfully, but these errors were encountered: