0.9.7.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. ========================
  2. Salt 0.9.7 Release Notes
  3. ========================
  4. :release: 2012-02-15
  5. Salt 0.9.7 is here! The latest iteration of Salt brings more features and many
  6. fixes. This release is a great refinement over 0.9.6, adding many conveniences
  7. under the hood, as well as some features that make working with Salt much
  8. better.
  9. A few highlights include the new Job system, refinements to the requisite
  10. system in states, the ``mod_init`` interface for states, external node
  11. classification, search path to managed files in the file state, and refinements
  12. and additions to dynamic module loading.
  13. 0.9.7 also introduces the long developed (and oft changed) unit test framework
  14. and the initial unit tests.
  15. Major Features
  16. ==============
  17. Salt Jobs Interface
  18. -------------------
  19. The new jobs interface makes the management of running executions much cleaner
  20. and more transparent. Building on the existing execution framework the jobs
  21. system allows clear introspection into the active running state of the
  22. running Salt interface.
  23. The Jobs interface is centered in the new minion side proc system. The
  24. minions now store msgpack serialized files under ``/var/cache/salt/proc``.
  25. These files keep track of the active state of processes on the minion.
  26. Functions in the saltutil Module
  27. ````````````````````````````````
  28. A number of functions have been added to the saltutil module to manage and
  29. view the jobs:
  30. ``running`` - Returns the data of all running jobs that are found in the proc
  31. directory.
  32. ``find_job`` - Returns specific data about a certain job based on job id.
  33. ``signal_job`` - Allows for a given jid to be sent a signal.
  34. ``term_job`` - Sends a termination signal (``SIGTERM, 15``) to the process
  35. controlling the specified job.
  36. ``kill_job`` Sends a kill signal (``SIGKILL, 9``) to the process controlling the
  37. specified job.
  38. The jobs Runner
  39. ---------------
  40. A convenience runner front end and reporting system has been added as well.
  41. The jobs runner contains functions to make viewing data easier and cleaner.
  42. The jobs runner contains a number of functions...
  43. active
  44. ``````
  45. The active function runs ``saltutil.running`` on all minions and formats the
  46. return data about all running jobs in a much more usable and compact format.
  47. The active function will also compare jobs that have returned and jobs that
  48. are still running, making it easier to see what systems have completed a job
  49. and what systems are still being waited on.
  50. lookup_jid
  51. ``````````
  52. When jobs are executed the return data is sent back to the master and cached.
  53. By default is cached for 24 hours, but this can be configured via the
  54. ``keep_jobs`` option in the master configuration.
  55. Using the ``lookup_jid`` runner will display the same return data that the
  56. initial job invocation with the salt command would display.
  57. list_jobs
  58. `````````
  59. Before finding a historic job, it may be required to find the job id.
  60. ``list_jobs`` will parse the cached execution data and display all of the job
  61. data for jobs that have already, or partially returned.
  62. External Node Classification
  63. ----------------------------
  64. Salt can now use external node classifiers like Cobbler's
  65. ``cobbler-ext-nodes``.
  66. Salt uses specific data from the external node classifier. In particular the
  67. classes value denotes which sls modules to run, and the environment value sets
  68. to another environment.
  69. An external node classification can be set in the master configuration file via
  70. the ``external_nodes`` option:
  71. https://salt.readthedocs.io/en/latest/ref/configuration/master.html#external-nodes
  72. External nodes are loaded in addition to the top files. If it is intended to
  73. only use external nodes, do not deploy any top files.
  74. State Mod Init System
  75. ---------------------
  76. An issue arose with the pkg state. Every time a package was run Salt would
  77. need to refresh the package database. This made systems with slower package
  78. metadata refresh speeds much slower to work with. To alleviate this issue the
  79. ``mod_init`` interface has been added to salt states.
  80. The ``mod_init`` interface is a function that can be added to a state file.
  81. This function is called with the first state called. In the case of the pkg
  82. state, the ``mod_init`` function sets up a tag which makes the package database
  83. only refresh on the first attempt to install a package.
  84. In a nutshell, the ``mod_init`` interface allows a state to run any command that
  85. only needs to be run once, or can be used to set up an environment for working
  86. with the state.
  87. Source File Search Path
  88. -----------------------
  89. The file state continues to be refined, adding speed and capabilities. This
  90. release adds the ability to pass a list to the source option. This list is then
  91. iterated over until the source file is found, and the first found file is used.
  92. The new syntax looks like this:
  93. .. code-block:: yaml
  94. /etc/httpd/conf/httpd.conf:
  95. file:
  96. - managed
  97. - source:
  98. - salt://httpd/httpd.conf
  99. - http://myserver/httpd.conf: md5=8c1fe119e6f1fd96bc06614473509bf1
  100. The source option can take sources in the list from the salt file server
  101. as well as an arbitrary web source. If using an arbitrary web source the
  102. checksum needs to be passed as well for file verification.
  103. Refinements to the Requisite System
  104. -----------------------------------
  105. A few discrepancies were still lingering in the requisite system, in
  106. particular, it was not possible to have a ``require`` and a ``watch`` requisite
  107. declared in the same state declaration.
  108. This issue has been alleviated, as well as making the requisite system run
  109. more quickly.
  110. Initial Unit Testing Framework
  111. ------------------------------
  112. Because of the module system, and the need to test real scenarios, the
  113. development of a viable unit testing system has been difficult, but unit
  114. testing has finally arrived. Only a small amount of unit testing coverage
  115. has been developed, much more coverage will be in place soon.
  116. A huge thanks goes out to those who have helped with unit testing, and the
  117. contributions that have been made to get us where we are. Without these
  118. contributions unit tests would still be in the dark.
  119. Compound Targets Expanded
  120. -------------------------
  121. Originally only support for ``and`` and ``or`` were available in the compound
  122. target. 0.9.7 adds the capability to negate compound targets with ``not``.
  123. Nodegroups in the Top File
  124. --------------------------
  125. Previously the nodegroups defined in the master configuration file could not
  126. be used to match nodes for states. The nodegroups support has been expanded
  127. and the nodegroups defined in the master configuration can now be used to
  128. match minions in the top file.