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 -
- Running Salt Master / Minion as Unprivileged User
- Minion Sudo Settings
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.
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.
I faced this problem. I tried clearing the cache by restarting the minion but didn't work. You need to kill the process.
salt '*' saltutil.kill_job 20150728155808625398
I don't know what you are .sls. You need to find which process you started with "state.highstate" on the minion and kill it. Saltstack allows one .sls file to run at a time. If you don't kill this process, it won't be able to zip another .sls file.