Closed pcrews closed 11 years ago
I saw the title and I was scared! The function is still returning a dict, it is just the default printout changed to be colored and attempt to display data in a more readable way. To get the old output pas --out pprint to the command. You could also pass --out json if you wanted to ingest the output from a script
Awesome! I had really hoped it was just operator error :). Thanks for the help and apologies for the false alarm. On Jan 18, 2013 5:23 PM, "Thomas S Hatch" notifications@github.com wrote:
I saw the title and I was scared! The function is still returning a dict, it is just the default printout changed to be colored and attempt to display data in a more readable way. To get the old output pas --out pprint to the command. You could also pass --out json if you wanted to ingest the output from a script
— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/3323#issuecomment-12448315.
No worries, anything we can do for you guys!
With salt-master / minion version 12.0, the mysql.query function seems to be returning a string vs. a dictionary:
This isn't happening with 11.1 and doesn't appear to be related to the mysql.py module file...the code still seems to want to return a dict, but somehow is being transformed into a string.
This renders the query output essentially unusable as we have no good hooks for parsing the data like we do with a returned dictionary.
Any help (even pointing out the operator error at play) would be most appreciated as this is breaking some jobs I rely on
version 12.0: salt mysql* mysql.query my_database "SELECT \ FROM devices" my_db_minion: columns:
Version 11.1
salt mysql* mysql.query lbaas "SELECT \ FROM devices" {'my_db_minion': {'columns': ['id', 'name', 'floatingIpAddr', 'publicIpAddr', 'loadbalancers', 'az', 'type', 'created', 'updated', 'status'], 'query time': {'human': '0.6ms', 'raw': '0.00058'}, 'results': [[51, 'my_node_name', '1.1.1.1', '1.1.1.1', ...