You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The process spawned by the minion plist has no HOME environment variable set for the root user it runs as. This is not seen when running from the minion with salt-call.
When running from the master, due to the change in brew in Homebrew/brew@4184546pkg.installed fails with an error about missing HOME passed in from brew. The lack of a HOME variable can be seen by running salt 'minion' environ.items from a remote master.
I propose setting the HOME variable in the postflight task in addition to the HOMEBREW_PREFIX variable. On an M2 on Sonoma, this is /var/root for the root user. Alternatively, I manually set it to /opt/salt in the plist.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Hi @lmf-mx, thank you for opening this issue. I know really well what are you talking about... I fixed this issue long time ago, but the fix was accepted recently saltstack/salt#64924
So, hopefully, salt 3007 won't have this issue.
In the meantime, I think I can add the environment variable as a workaround for this issue. I'll remove it once salt 3007 is available.
Hi @cdalvaro, I saw the PR you referenced. Maybe I'm missing something, but I don't see anything that sets the HOME variable in the spawned minions environment. The change in brew specifically tests for that now, aside from the HOMEBREW_PREFIX issue.
Hi @cdalvaro, I saw the PR you referenced. Maybe I'm missing something, but I don't see anything that sets the HOME variable in the spawned minions environment. The change in brew specifically tests for that now, aside from the HOMEBREW_PREFIX issue.
The fix can be a bit obscure, but in the end, the main problem was here. In order to get the brewprefix, salt was asking brew for it, but running brew as root.
Now, the way to get the homebrew's prefix is a little more complex, looking first for the HOMEBREW_PREFIX env variable. Then, if it is not present, salt asks brew for its prefix, but this time running the command as brew's owner user (with is HOME directory defined) instead of running as root.
Description
The process spawned by the minion plist has no HOME environment variable set for the root user it runs as. This is not seen when running from the minion with salt-call.
When running from the master, due to the change in brew in Homebrew/brew@4184546
pkg.installed
fails with an error about missing HOME passed in from brew. The lack of a HOME variable can be seen by runningsalt 'minion' environ.items
from a remote master.I propose setting the HOME variable in the postflight task in addition to the HOMEBREW_PREFIX variable. On an M2 on Sonoma, this is
/var/root
for the root user. Alternatively, I manually set it to/opt/salt
in the plist.Additional Information
No response
The text was updated successfully, but these errors were encountered: