From 6f96971c9440ae3b95e25c41dce84ee451589ec5 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 12 Sep 2013 17:10:45 -0500 Subject: [PATCH 1/2] Update "current release" link to 0.16.4 --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index fee0ffb42f..3e38b5f9b1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -103,7 +103,7 @@ copyright = '2013 SaltStack, Inc.' version = salt.version.__version__ #release = '.'.join(map(str, salt.version.__version_info__)) -release = '0.16.3' +release = '0.16.4' language = 'en' locale_dirs = [ From 97015a5db4b49b0d2f3930475b85c9cd3f780467 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 12 Sep 2013 17:11:10 -0500 Subject: [PATCH 2/2] Add more information about salt-call This adds additional information both to the walkthrough and the "troubleshooting" page. --- doc/topics/troubleshooting/index.rst | 55 ++++++++++++++++------------ doc/topics/tutorials/walkthrough.rst | 10 +++++ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/doc/topics/troubleshooting/index.rst b/doc/topics/troubleshooting/index.rst index b4392d0ced..7218956166 100644 --- a/doc/topics/troubleshooting/index.rst +++ b/doc/topics/troubleshooting/index.rst @@ -13,10 +13,10 @@ A great deal of information is available via the debug logging system, if you are having issues with minions connecting or not starting run the minion and/or master in the foreground: -.. code-block:: sh +.. code-block:: bash - # salt-master -l debug - # salt-minion -l debug + salt-master -l debug + salt-minion -l debug Anyone wanting to run Salt daemons via a process supervisor such as `monit`_, `runit`_, or `supervisord`_, should omit the ``-d`` argument to the daemons and @@ -36,10 +36,10 @@ it could very well be a firewall. You can check port connectivity from the minion with the nc command: -.. code-block:: sh +.. code-block:: bash - # nc -v -z salt.master.ip 4505 - # nc -v -z salt.master.ip 4506 + nc -v -z salt.master.ip 4505 + nc -v -z salt.master.ip 4506 There is also a :doc:`firewall configuration` document that might help as well. @@ -53,6 +53,8 @@ Salt. .. _`AppArmor`: http://wiki.apparmor.net/index.php/Main_Page +.. _using-salt-call: + Using salt-call =============== @@ -60,17 +62,23 @@ The ``salt-call`` command was originally developed for aiding in the development of new Salt modules. Since then, many applications have been developed for running any Salt module locally on a minion. These range from the original intent of salt-call, development assistance, to gathering more verbose output -from calls like :doc:`state.highstate`. +from calls like :mod:`state.highstate `. -When developing the State Tree it is generally recommended to invoke -state.highstate with salt-call. This displays far more information -about the highstate execution than calling it remotely. For even more -verbosity, increase the loglevel with the same argument as ``salt-minion``: +When creating your state tree, it is generally recommended to invoke +:mod:`state.highstate ` with ``salt-call``. This +displays far more information about the highstate execution than calling it +remotely. For even more verbosity, increase the loglevel with the same argument +as ``salt-minion``: -.. code-block:: sh +.. code-block:: bash salt-call -l debug state.highstate +The main difference between using ``salt`` and using ``salt-call`` is that +``salt-call`` is run from the minion, and it only runs the selected function on +that minion. By contrast, ``salt`` is run from the master, and requires you to +specify the minions on which to run the command using salt's :doc:`targeting +system `. Too many open files =================== @@ -79,7 +87,7 @@ The salt-master needs at least 2 sockets per host that connects to it, one for the Publisher and one for response port. Thus, large installations may, upon scaling up the number of minions accessing a given master, encounter: -.. code-block:: sh +.. code-block:: bash 12:45:29,289 [salt.master ][INFO ] Starting Salt worker process 38 Too many open files @@ -88,7 +96,7 @@ scaling up the number of minions accessing a given master, encounter: The solution to this would be to check the number of files allowed to be opened by the user running salt-master (root by default): -.. code-block:: sh +.. code-block:: bash [root@salt-master ~]# ulimit -n 1024 @@ -111,7 +119,7 @@ field in ``net.ipv4.tcp_rmem`` and ``net.ipv4.tcp_wmem`` to at least 16777216. You can do it manually with something like: -.. code-block:: sh +.. code-block:: bash # echo 16777216 > /proc/sys/net/core/rmem_max # echo 16777216 > /proc/sys/net/core/wmem_max @@ -160,12 +168,12 @@ to this issue is to set the execution context of ``salt-call`` and .. code-block:: bash # CentOS 5 and RHEL 5: - # chcon -t system_u:system_r:rpm_exec_t:s0 /usr/bin/salt-minion - # chcon -t system_u:system_r:rpm_exec_t:s0 /usr/bin/salt-call + chcon -t system_u:system_r:rpm_exec_t:s0 /usr/bin/salt-minion + chcon -t system_u:system_r:rpm_exec_t:s0 /usr/bin/salt-call # CentOS 6 and RHEL 6: - # chcon system_u:object_r:rpm_exec_t:s0 /usr/bin/salt-minion - # chcon system_u:object_r:rpm_exec_t:s0 /usr/bin/salt-call + chcon system_u:object_r:rpm_exec_t:s0 /usr/bin/salt-minion + chcon system_u:object_r:rpm_exec_t:s0 /usr/bin/salt-call This works well, because the ``rpm_exec_t`` context has very broad control over other types. @@ -184,9 +192,8 @@ needs to be run with the ``python26`` executable. Common YAML Gotchas =================== -An extensive list of -:doc:`YAML idiosyncrasies` -has been compiled. +An extensive list of :doc:`YAML idiosyncrasies +` has been compiled. Live Python Debug Output ======================== @@ -198,8 +205,8 @@ sure the master of minion are running in the foreground: .. code-block:: bash - # salt-master -l debug - # salt-minion -l debug + salt-master -l debug + salt-minion -l debug The pass the signal to the master or minion when it seems to be unresponsive: diff --git a/doc/topics/tutorials/walkthrough.rst b/doc/topics/tutorials/walkthrough.rst index d6e6d0420a..e67b81f875 100644 --- a/doc/topics/tutorials/walkthrough.rst +++ b/doc/topics/tutorials/walkthrough.rst @@ -346,6 +346,16 @@ addresses, etc: salt '*' network.interfaces +``salt-call`` +~~~~~~~~~~~~~ + +The examples so far have described running commands from the Master using the +``salt`` command, but when troubleshooting it can be more beneficial to login +to the minion directly and use ``salt-call``. Doing so allows you to see the +minion log messages specific to the command you are running (which are *not* +part of the return data you see when running the command from the Master using +``salt``), making it unnecessary to tail the minion log. More information on +``salt-call`` and how to use it can be found :ref:`here `. Grains ~~~~~~