This addition makes it so that ALL data in the low state chunk is passed
to the state function via **kwargs. This means that by passing a
**kwargs from states all the back to a module function will allow for
very transparent additions of arguments to states that accept **kwargs
Only pass the user in payload if it is not root and not the specified
user from the configuration file. Those two users are implied to be
the executor if there's no specific user. Log statements referencing
the user have been wrapped in statements testing for the existence of
the user key in the payload, otherwise log messages fall back to a
non-user log message (it will continue to do this for root).
This preserves backwards compatibility for masters that would never
pass the user as well
Track the executing user and do some best effort work to figure out who
it is based on environment variables. Pass the user in the payload
and allow for logging of summary information about the job the user
ran, but also allow for a raw dump of the user's target, arguments,
etc.
This aids in auditability of a user on a system trying to figure out
what made a change and when.
It looks like when the following commit[1] was made it broke the mysql
module, and I haven't noticed until now some how.
My guess is that __opts__ used to look like
__opts__['mysql']['default_file'] where as it now looks like
__opts__['mysql.default_file']
[1] = b7e7cc3cb1
I spent the past 30 min trying to debug a problem where when a command
was published to the minion it was arriving as a string instead of a
tuple. The cmd.run module was receiving:
{
'arg': 'mycommand myarg1 myarg2'
'fun': 'cmd.run',
'jid': '20120226160155389058',
'ret': '',
'tgt': 'mytarget'
}
This was causing the following exception:
TypeError: run() takes at most 3 arguments (20 given)
I traced this down to the publish module checking for an instance of
'str' and splitting on ','.
In my instance the problem was being caused because Django likes to use
Unicode strings everywhere and the isintance was returning False.
I've replaced all instances of str with basestring in all the isintance
checks.