Frequently Asked Questions¶
FAQ
- Frequently Asked Questions
- Is Salt open-core?
- What ports should I open on my firewall?
- My script runs every time I run a state.highstate. Why?
- When I run test.ping, why don't the Minions that aren't responding return anything? Returning
False
would be helpful. - How does Salt determine the Minion's id?
- I'm trying to manage packages/services but I get an error saying that the state is not available. Why?
- I'm using gitfs and my custom modules/states/etc are not syncing. Why?
- Why aren't my custom modules/states/etc. available on my Minions?
- Module
X
isn't available, even though the shell command it uses is installed. Why?
Is Salt open-core?¶
No. Salt is 100% committed to being open-source, including all of our APIs and the new 'Halite' web interface which will be included in version 0.17.0. It is developed under the Apache 2.0 license, allowing it to be used in both open and proprietary projects.
What ports should I open on my firewall?¶
Minions need to be able to connect to the Master on TCP ports 4505 and 4506. Minions do not need any inbound ports open. More detailed information on firewall settings can be found here.
My script runs every time I run a state.highstate. Why?¶
You are probably using cmd.run
rather than
cmd.wait
. A cmd.wait
state will only run when there has been a change in a
state that it is watching.
A cmd.run
state will run the corresponding command
every time (unless it is prevented from running by the unless
or onlyif
arguments).
More details can be found in the docmentation for the cmd
states.
When I run test.ping, why don't the Minions that aren't responding return anything? Returning False
would be helpful.¶
When you run test.ping the Master tells Minions to run commands/functions, and listens for the return data, printing it to the screen when it is received. If it doesn't receive anything back, it doesn't have anything to display for that Minion.
There are a couple options for getting information on Minions that are not
responding. One is to use the verbose (-v
) option when you run salt
commands, as it will display "Minion did not return" for any Minions which time
out.
salt -v '*' pkg.install zsh
Another option is to use the manage.down
runner:
salt-run manage.down
How does Salt determine the Minion's id?¶
If the Minion id is not configured explicitly (using the id
parameter), Salt will determine the id based on the hostname. Exactly how this
is determined varies a little between operating systems and is described in
detail here.
I'm trying to manage packages/services but I get an error saying that the state is not available. Why?¶
Salt detects the Minion's operating system and assigns the correct package or service management module based on what is detected. However, for certain custom spins and OS derivatives this detection fails. In cases like this, an issue should be opened on our tracker, with the following information:
The output of the following command:
salt <minion_id> grains.items | grep os
The contents of
/etc/lsb-release
, if present on the Minion.
I'm using gitfs and my custom modules/states/etc are not syncing. Why?¶
In versions of Salt 0.16.3 or older, there is a bug in gitfs which can affect the syncing of custom types. Upgrading to 0.16.4 or newer will fix this.
Why aren't my custom modules/states/etc. available on my Minions?¶
Custom modules are only synced to Minions when state.highstate
, saltutil.sync_modules
, or saltutil.sync_all
is run. Similarly, custom states are only
synced to Minions when state.highstate
,
saltutil.sync_states
, or
saltutil.sync_all
is run.
Other custom types (renderers, outputters, etc.) have similar behavior, see the
documentation for the saltutil
module for more
information.
Module X
isn't available, even though the shell command it uses is installed. Why?¶
This is most likely a PATH issue. Did you custom-compile the software which the
module requires? RHEL/CentOS/etc. in particular override the root user's path
in /etc/init.d/functions
, setting it to /sbin:/usr/sbin:/bin:/usr/bin
,
making software installed into /usr/local/bin
unavailable to Salt when the
Minion is started using the initscript. In version 0.18.0, Salt will have a
better solution for these sort of PATH-related issues, but recompiling the
software to install it into a location within the PATH should resolve the
issue in the meantime. Alternatively, you can create a symbolic link within the
PATH using a file.symlink
state.
/usr/bin/foo:
file.symlink:
- target: /usr/local/bin/foo