Discussion:
Windows path changes require minion restart
Benjamen Keroack
2014-01-18 00:59:00 UTC
Permalink
One more issue with Windows minions:

If the global PATH changes (for example, after software installation) the
only way to get salt commands to pick up the new path is to restart the
minion.

$ salt 'web001' cmd.run 'C:\Chocolatey\bin\choco install git' -vv -t 300
[...]
$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005154128621
-------------------------------------------

web001:
'git' is not recognized as an internal or external command,
operable program or batch file.

After restarting minion:

$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005340772634
-------------------------------------------

web001:
usage: git [--version] [--help] [-C <path>] [-c name=value]
[..]


Restarting the minion must be done out-of-band, since doing this will hang
the minion:

$ salt 'web001' cmd.run 'Restart-Service salt-minion' shell=powershell


I doubt this issue exists with Linux minions, so it should be addressed for
Windows.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Colton Myers
2014-01-21 20:42:48 UTC
Permalink
Actually, this is something the Linux minion does not do either. That
said, giving the salt minion the ability to refresh its environment
variables will probably be pretty straightforward on both platforms. Can
you please create an issue on Github?

--
Colton Myers
Post by Benjamen Keroack
If the global PATH changes (for example, after software installation) the
only way to get salt commands to pick up the new path is to restart the
minion.
$ salt 'web001' cmd.run 'C:\Chocolatey\bin\choco install git' -vv -t 300
[...]
$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005154128621
-------------------------------------------
'git' is not recognized as an internal or external command,
operable program or batch file.
$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005340772634
-------------------------------------------
usage: git [--version] [--help] [-C <path>] [-c name=value]
[..]
Restarting the minion must be done out-of-band, since doing this will hang
$ salt 'web001' cmd.run 'Restart-Service salt-minion' shell=powershell
I doubt this issue exists with Linux minions, so it should be addressed
for Windows.
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Benjamen Keroack
2014-01-22 02:18:27 UTC
Permalink
Done.

https://github.com/saltstack/salt/issues/9876
Post by Colton Myers
Actually, this is something the Linux minion does not do either. That
said, giving the salt minion the ability to refresh its environment
variables will probably be pretty straightforward on both platforms. Can
you please create an issue on Github?
--
Colton Myers
Post by Benjamen Keroack
If the global PATH changes (for example, after software installation) the
only way to get salt commands to pick up the new path is to restart the
minion.
$ salt 'web001' cmd.run 'C:\Chocolatey\bin\choco install git' -vv -t 300
[...]
$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005154128621
-------------------------------------------
'git' is not recognized as an internal or external command,
operable program or batch file.
$ salt 'web001' cmd.run 'git' -v -t 300
Executing job with jid 20140118005340772634
-------------------------------------------
usage: git [--version] [--help] [-C <path>] [-c name=value]
[..]
Restarting the minion must be done out-of-band, since doing this will
$ salt 'web001' cmd.run 'Restart-Service salt-minion' shell=powershell
I doubt this issue exists with Linux minions, so it should be addressed
for Windows.
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...