-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
UnicodeDecodeError when using cache mysql #48342
Comments
can you share a sanitized version of your mysql cache salt master config to help replicate the issue? |
|
im having a hard time replicating this. I am able to run a |
My apologies. I left out a configuration option.
To answer your question, I'm not running a specific command. As soon as I set the "cache: mysql" setting and restart the master the error begins showing in the log every few seconds without running any command from the masters console. |
okay looks like i'm able to replicate this now thanks. we will need to get this fixed up. thanks |
I removed the existing mysql_cache.py* files from /usr/lib/python2.7/site-packages/salt/cache then ran 'wget https://raw.githubusercontent.com/garethgreenaway/salt/0029f1903303954bf0ed9d470e4a487d422158a1/salt/cache/mysql_cache.py' to obtain the patched file and I get a similar error.
|
@rallytime I also tried DmitryKuzmenko suggestion #48495 and that gave an error about .hex() not existing. I tried modifying to to be hex(data) and got an error that the value couldn't be converted to hex. |
@garethgreenaway Can you follow up when you get a moment on this one? |
I imported binascii to mysql_cache.py and changed store() as shown below
This resolved the error and data is now going into the 'data' column of the database. However, I'm not sure if it's the correct format or if other changes are required to retrieve the data properly. |
Just following up to see if my solution above is the proper fix for this issue or not. Thanks |
@jeffclay This looks good for me. Would you be able to prepare a pull request with the change above? |
closing as stale |
Description of Issue/Question
I configured mysql cache. The master was able to contact the mariadb server and create the specified table in the correct db but the salt masters log file is spammed with the error below.
Setup
localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: us
X11 Layout: us
Versions Report
The text was updated successfully, but these errors were encountered: