Salt minion, as a non-root user, always returns an error when executing sudo commands "Function" state.highstate "works like PID .."
I'm trying to set up salt-minion
to run as a non-root user, but all his commands are executed through a user sudo
, which seems possible with the latest salt release
I created the user my-minion, gave it sudo privileges and made sure no password is required to execute the command, and configured the minion accordingly.
/etc. / sudoers
# sudo privileges and permission to execute cmds with no password
my-minion ALL=(ALL) NOPASSWD:ALL
/ etc / salt / mignon
# The user to run salt.
user: my-minion
sudo_user: root
However, after execution, the salt '*' state.highstate
minion always returns the following error -
/ var / input / salt / mignon
The function "state.highstate" is running as PID 17121 and was started at 2015, Jul 28 15:58:08.625398 with jid 20150728155808625398
There is nothing particularly useful in the debug logs other than state.highstate
getting it LazyLoaded
twice. I have magazines with me. Let me know if needed.
I am sure I have configured everything correctly according to the following docs -
The version salt
I am using is 2015.5.3 (lithium) and the operating system is CentOS 6.6
Note: The
error goes away when I just comment out a property sudo_user
in the config file minion
, but obviously I don't get the functionality I was looking for. So sure it is a problem because of this attribute and not something else.
I would appreciate it if someone could point me in the right direction or clarify if this is a bug in the salt implementation.
source to share
Try restarting the salt shaker demon. If that doesn't work, try deleting your directory /var/cache/salt/master/proc
and restarting the salt minion daemon.
The error you are seeing is being checked by Salt to check if another highstate is working and preventing you from starting another. You have to make sure that this is not the case.
source to share