2017.7.0.rst 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. .. _release-2017-7-0:
  2. ===============================================
  3. Salt 2017.7.0 Release Notes - Codename Nitrogen
  4. ===============================================
  5. ========
  6. Python 3
  7. ========
  8. The 2017.7 Salt Release adds initial Python 3 support.
  9. The default Python version of Salt will remain Python 2, although Python 3 packages will be supplied for users who want to help test this new feature.
  10. ======================
  11. Python 2.6 Deprecation
  12. ======================
  13. Salt will no longer support Python 2.6. We will provide python2.7 packages on our repo_ for RedHat and CentOS 6 to ensure users can still run Salt on these platforms.
  14. .. _repo: https://repo.saltstack.com/
  15. As this will impact the installation of additional dependencies for salt modules please use pip packages if there is not a package available in a repository. You will need to install the python27-pip package to get access to the correct pip27 executable: ``yum install python27-pip``
  16. ============
  17. Known Issues
  18. ============
  19. The following salt-cloud drivers have known issues running with Python 3. These drivers will not work with Python 3, and Python 2.7 should be used instead:
  20. - Joyent
  21. - When running under Python 3, users who require Unicode support should ensure that a locale is set on their machines.
  22. Users using the `C` locale are advised to switch to a UTF-aware locale to ensure proper functionality with Salt with Python 3.
  23. Remember to update the Salt Master first
  24. ========================================
  25. Salt's policy has always been that when upgrading, the minion should never be
  26. on a newer version than the master. Specifically with this update, because of
  27. changes in the fileclient, the 2017.7 minion requires a 2017.7 master.
  28. Backwards compatibility is still maintained, so older minions can still be used.
  29. More information can be found in the :ref:`Salt FAQ<which-version>`
  30. States Added for Management of systemd Unit Masking
  31. ===================================================
  32. The :py:func:`service.masked <salt.states.service.masked>` and
  33. :py:func:`service.umasked <salt.states.service.unmasked>` states have been
  34. added to allow Salt to manage masking of systemd units.
  35. Additionally, the following functions in the :mod:`systemd
  36. <salt.modules.systemd>` execution module have changed to accommodate the fact
  37. that indefinite and runtime masks can co-exist for the same unit:
  38. - :py:func:`service.masked <salt.modules.systemd.masked>` - The return from
  39. this function has changed from previous releases. Before, ``False`` would be
  40. returned if the unit was not masked, and the output of ``systemctl is-enabled
  41. <unit name>`` would be returned if the unit was masked. However, since
  42. indefinite and runtime masks can exist for the same unit at the same time,
  43. this function has been altered to accept a ``runtime`` argument. If ``True``,
  44. the minion will be checked for a runtime mask assigned to the named unit. If
  45. ``False``, then the minion will be checked for an indefinite mask. If one is
  46. found, ``True`` will be returned. If not, then ``False`` will be returned.
  47. - :py:func:`service.masked <salt.modules.systemd.masked>` - This function used
  48. to just run ``systemctl is-enabled <unit name>`` and based on the return
  49. from this function the corresponding mask type would be removed. However, if
  50. both runtime and indefinite masks are set for the same unit, then ``systemctl
  51. is-enabled <unit name>`` would show just the indefinite mask. The indefinite
  52. mask would be removed, but the runtime mask would remain. The function has
  53. been modified to accept a ``runtime`` argument, and will attempt to remove a
  54. runtime mask if that argument is set to ``True``. If set to ``False``, it
  55. will attempt to remove an indefinite mask.
  56. These new ``runtime`` arguments default to ``False``.
  57. Pillar Encryption
  58. =================
  59. Beginning in 2016.3.0 the CLI pillar data passed to several functions could
  60. conditionally be passed through a renderer to be decrypted. This functionality
  61. has now been extended to pillar SLS files as well. See :ref:`here
  62. <pillar-encryption>` for detailed documentation on this feature.
  63. Grains Changes
  64. ==============
  65. - The ``osmajorrelease`` grain has been changed from a string to an integer.
  66. State files, especially those using a templating language like Jinja, may
  67. need to be adjusted to account for this change.
  68. - Add ability to specify disk backing mode in the VMWare salt cloud profile.
  69. State Module Changes
  70. ====================
  71. - The :py:func:`service.running <salt.states.service.running>` and
  72. :py:func:`service.dead <salt.states.service.dead>` states now support a
  73. ``no_block`` argument which, when set to ``True`` on systemd minions, will
  74. start/stop the service using the ``--no-block`` flag in the ``systemctl``
  75. command. On non-systemd minions, a warning will be issued.
  76. - The :py:func:`module.run <salt.states.module.run>` state has dropped its
  77. previous syntax with ``m_`` prefix for reserved keywords. Additionally, it
  78. allows running several functions in a batch.
  79. .. note::
  80. It is necessary to explicitly turn on the new behavior (see below)
  81. .. code-block:: yaml
  82. # Before
  83. run_something:
  84. module.run:
  85. - name: mymodule.something
  86. - m_name: 'some name'
  87. - kwargs: {
  88. first_arg: 'one',
  89. second_arg: 'two',
  90. do_stuff: 'True'
  91. }
  92. # After
  93. run_something:
  94. module.run:
  95. - mymodule.something:
  96. - name: some name
  97. - first_arg: one
  98. - second_arg: two
  99. - do_stuff: True
  100. Since a lot of users are already using :py:func:`module.run
  101. <salt.states.module.run>` states, this new behavior must currently be
  102. explicitly turned on, to allow users to take their time updating their SLS
  103. files. However, please keep in mind that the new syntax will take effect in
  104. the next feature release of Salt (Oxygen) and the old usage will no longer be
  105. supported at that time.
  106. Another feature of the new :py:func:`module.run <salt.states.module.run>` is that
  107. it allows calling many functions in a single batch, such as:
  108. .. code-block:: yaml
  109. run_something:
  110. module.run:
  111. - mymodule.function_without_parameters:
  112. - mymodule.another_function:
  113. - myparam
  114. - my_other_param
  115. In a rare case that you have a function that needs to be called several times but
  116. with the different parameters, an additional feature of "tagging" is to the
  117. rescue. In order to tag a function, use a colon delimiter. For example:
  118. .. code-block:: yaml
  119. run_something:
  120. module.run:
  121. - mymodule.same_function:1:
  122. - mymodule.same_function:2:
  123. - myparam
  124. - my_other_param
  125. - mymodule.same_function:3:
  126. - foo: bar
  127. The example above will run `mymodule.same_function` three times with the
  128. different parameters.
  129. To enable the new behavior for :py:func:`module.run <salt.states.module.run>`,
  130. add the following to the minion config file:
  131. .. code-block:: yaml
  132. use_superseded:
  133. - module.run
  134. - The default for the ``fingerprint_hash_type`` option used in the ``present``
  135. function in the :mod:`ssh <salt.states.ssh_know_hosts>` state changed from
  136. ``md5`` to ``sha256``.
  137. Execution Module Changes
  138. ========================
  139. - Several functions in the :mod:`systemd <salt.modules.systemd>` execution
  140. module have gained a ``no_block`` argument, which when set to ``True`` will
  141. use ``--no-block`` in the ``systemctl`` command.
  142. - In the :mod:`solarisips <salt.modules.solarisips>` ``pkg`` module, the
  143. default value for the ``refresh`` argument to the ``list_upgrades`` function
  144. has been changed from ``False`` to ``True``. This makes the function more
  145. consistent with all of the other ``pkg`` modules (The other
  146. ``pkg.list_upgrades`` functions all defaulted to ``True``).
  147. - The functions which handle masking in the :mod:`systemd
  148. <salt.modules.systemd>` module have changed. These changes are described
  149. above alongside the information on the new states which have been added to
  150. manage masking of systemd units.
  151. - The :py:func:`pkg.list_repo_pkgs <salt.modules.yumpkg.list_repo_pkgs>`
  152. function for yum/dnf-based distros has had its default output format changed.
  153. In prior releases, results would be organized by repository. Now, the default
  154. for each package will be a simple list of versions. To get the old behavior,
  155. pass ``byrepo=True`` to the function.
  156. - A ``pkg.list_repo_pkgs`` function has been added for both
  157. :py:func:`Debian/Ubuntu <salt.modules.aptpkg.list_repo_pkgs>` and
  158. :py:func:`Arch Linux <salt.modules.pacman.list_repo_pkgs>`-based distros.
  159. - The :mod:`system <salt.modules.system>` module changed its return format
  160. from "HH:MM AM/PM" to "HH:MM:SS AM/PM" for `get_system_time`.
  161. - The default for the ``fingerprint_hash_type`` option used in the
  162. :mod:`ssh <salt.modules.ssh>` execution module changed from ``md5`` to
  163. ``sha256``.
  164. Proxy Module Changes
  165. ====================
  166. The :conf_proxy:`proxy_merge_grains_in_module` configuration variable
  167. introduced in 2016.3, has been changed, defaulting to ``True``.
  168. The connection with the remote device is kept alive by default, when the
  169. module implements the ``alive`` function and :conf_proxy:`proxy_keep_alive`
  170. is set to ``True``. The polling interval is set using the
  171. :conf_proxy:`proxy_keep_alive_interval` option which defaults to 1 minute.
  172. The developers are also able to use the :conf_proxy:`proxy_always_alive`,
  173. when designing a proxy module flexible enough to open the
  174. connection with the remote device only when required.
  175. Wildcard Versions in :py:func:`pkg.installed <salt.states.pkg.installed>` States
  176. ================================================================================
  177. - The :py:func:`pkg.installed <salt.states.pkg.installed>` state now supports
  178. wildcards in package versions, for the following platforms:
  179. - SUSE/openSUSE Leap/Thumbleweed
  180. - Debian/Ubuntu
  181. - RHEL/CentOS
  182. - Arch Linux
  183. This support also extends to any derivatives of these distros, which use the
  184. :mod:`aptpkg <salt.modules.aptpkg>`, :mod:`yumpkg <salt.modules.yumpkg>`, or
  185. :mod:`pacman <salt.modules.pacman>` providers for the ``pkg`` virtual module.
  186. Using wildcards can be useful for packages where the release name is built into
  187. the version in some way, such as for RHEL/CentOS which typically has version
  188. numbers like ``1.2.34-5.el7``. An example of the usage for this would be:
  189. .. code-block:: yaml
  190. mypkg:
  191. pkg.installed:
  192. - version: '1.2.34*'
  193. Master Configuration Additions
  194. ==============================
  195. - :conf_master:`syndic_forward_all_events` - Option on multi-syndic or single
  196. when connected to multiple masters to be able to send events to all connected
  197. masters.
  198. - :conf_master:`eauth_acl_module` - In case external auth is enabled master can
  199. get authenticate and get the authorization list from different auth modules.
  200. - :conf_master:`keep_acl_in_token` - Option that allows master to build ACL once
  201. for each user being authenticated and keep it in the token.
  202. Minion Configuration Additions
  203. ==============================
  204. - :conf_minion:`pillarenv_from_saltenv` - When set to ``True`` (default is
  205. ``False``), the :conf_minion:`pillarenv` option will take the same value as
  206. the effective saltenv when running states. This would allow a user to run
  207. ``salt '*' state.apply mysls saltenv=dev``, and the SLS for both the state
  208. and pillar data would be sourced from the ``dev`` environment, essentially
  209. the equivalent of running ``salt '*' state.apply mysls saltenv=dev
  210. pillarenv=dev``. Note that if :conf_minion:`pillarenv` is set in the minion
  211. config file, or if ``pillarenv`` is provided on the CLI, it will override
  212. this option.
  213. salt-api Changes
  214. ================
  215. The ``rest_cherrypy`` netapi module has received a few minor improvements:
  216. * A CORS bugfix.
  217. * A new ``/token`` convenience endpoint to generate Salt eauth tokens.
  218. * A proof-of-concept JavaScript single-page application intended to demonstrate
  219. how to use the Server-Sent Events stream in an application. It is available
  220. in a default install by visiting the ``/app`` URL in a browser.
  221. Python API Changes
  222. ==================
  223. ``expr_form`` Deprecation
  224. -------------------------
  225. The :ref:`LocalClient <local-client>`'s ``expr_form`` argument has been
  226. deprecated and renamed to ``tgt_type``. This change was made due to numerous
  227. reports of confusion among community members, since the targeting method is
  228. published to minions as ``tgt_type``, and appears as ``tgt_type`` in the job
  229. cache as well.
  230. While ``expr_form`` will continue to be supported until the **2019.2.0**
  231. release cycle (two major releases after this one), those who are using the
  232. :ref:`LocalClient <local-client>` (either directly, or implictly via a
  233. :ref:`netapi module <all-netapi-modules>`) are encouraged to update their code
  234. to use ``tgt_type``.
  235. ``full_return`` Argument in ``LocalClient`` and ``RunnerClient``
  236. ----------------------------------------------------------------
  237. An ``full_return`` argument has been added to the ``cmd`` and ``cmd_sync``
  238. methods in ``LocalClient`` and ``RunnerClient`` which causes the return data
  239. structure to include job meta data such as ``retcode``.
  240. This is useful at the Python API:
  241. .. code-block:: python
  242. >>> import salt.client
  243. >>> client = salt.client.LocalClient()
  244. >>> client.cmd('*', 'cmd.run', ['return 1'], full_return=True)
  245. {'jerry': {'jid': '20170520151213898053', 'ret': '', 'retcode': 1}}
  246. As well as from salt-api:
  247. .. code-block:: bash
  248. % curl -b /tmp/cookies.txt -sS http://localhost:8000 \
  249. -H 'Content-type: application/json' \
  250. -d '[{
  251. "client": "local",
  252. "tgt": "*",
  253. "fun": "cmd.run",
  254. "arg": ["return 1"],
  255. "full_return": true
  256. }]'
  257. {"return": [{"jerry": {"jid": "20170520151531477653", "retcode": 1, "ret": ""}}]}
  258. Jinja
  259. =====
  260. Filters
  261. -------
  262. New filters in 2017.7.0:
  263. - :jinja_ref:`to_bool`
  264. - :jinja_ref:`exactly_n_true`
  265. - :jinja_ref:`exactly_one_true`
  266. - :jinja_ref:`quote`
  267. - :jinja_ref:`regex_search`
  268. - :jinja_ref:`regex_match`
  269. - :jinja_ref:`uuid`
  270. - :jinja_ref:`is_list`
  271. - :jinja_ref:`is_iter`
  272. - :jinja_ref:`min`
  273. - :jinja_ref:`max`
  274. - :jinja_ref:`avg`
  275. - :jinja_ref:`union`
  276. - :jinja_ref:`intersect`
  277. - :jinja_ref:`difference`
  278. - :jinja_ref:`symmetric_difference`
  279. - :jinja_ref:`is_sorted`
  280. - :jinja_ref:`compare_lists`
  281. - :jinja_ref:`compare_dicts`
  282. - :jinja_ref:`is_hex`
  283. - :jinja_ref:`contains_whitespace`
  284. - :jinja_ref:`substring_in_list`
  285. - :jinja_ref:`check_whitelist_blacklist`
  286. - :jinja_ref:`date_format`
  287. - :jinja_ref:`str_to_num`
  288. - :jinja_ref:`to_bytes`
  289. - :jinja_ref:`json_decode_list`
  290. - :jinja_ref:`json_decode_dict`
  291. - :jinja_ref:`rand_str`
  292. - :jinja_ref:`md5`
  293. - :jinja_ref:`sha256`
  294. - :jinja_ref:`sha512`
  295. - :jinja_ref:`base64_encode`
  296. - :jinja_ref:`base64_decode`
  297. - :jinja_ref:`hmac`
  298. - :jinja_ref:`http_query`
  299. - :jinja_ref:`is_ip`
  300. - :jinja_ref:`is_ipv4`
  301. - :jinja_ref:`is_ipv6`
  302. - :jinja_ref:`ipaddr`
  303. - :jinja_ref:`ipv4`
  304. - :jinja_ref:`ipv6`
  305. - :jinja_ref:`network_hosts`
  306. - :jinja_ref:`network_size`
  307. - :jinja_ref:`gen_mac`
  308. - :jinja_ref:`mac_str_to_bytes`
  309. - :jinja_ref:`dns_check`
  310. - :jinja_ref:`is_text_file`
  311. - :jinja_ref:`is_binary_file`
  312. - :jinja_ref:`is_empty_file`
  313. - :jinja_ref:`file_hashsum`
  314. - :jinja_ref:`list_files`
  315. - :jinja_ref:`path_join`
  316. - :jinja_ref:`which`
  317. Logs
  318. ----
  319. Another new feature - although not limited to Jinja only -
  320. is being able to log debug messages directly from the template:
  321. .. code-block:: jinja
  322. {%- do salt.log.error('logging from jinja') -%}
  323. See the :jinja_ref:`logs` paragraph.
  324. Network Automation
  325. ==================
  326. NAPALM
  327. ------
  328. Introduced in 2016.11, the modules for cross-vendor network automation
  329. have been improved, enhanced and widenened in scope:
  330. - Manage network devices like servers: the NAPALM modules have been transformed
  331. so they can run in both proxy and regular minions. That means, if the
  332. operating system allows, the salt-minion package can be installed directly
  333. on the network gear. Examples of such devices (also covered by NAPALM)
  334. include: Arista, Cumulus, Cisco IOS-XR or Cisco Nexus.
  335. - Not always alive: in certain less dynamic environments,
  336. maintaining the remote connection permanently open with the network device
  337. is not always beneficial. In those particular cases, the user can select
  338. to initialize the connection only when needed, by specifying the field
  339. ``always_alive: false`` in the :mod:`proxy configuration <salt.proxy.napalm>`
  340. or using the :conf_proxy:`proxy_always_alive` option.
  341. - Proxy keepalive: due to external factors, the connection with the remote
  342. device can be dropped, e.g.: packet loss, idle time (no commands issued
  343. within a couple of minutes or seconds), or simply the device decides to kill
  344. the process. In 2017.7.0 we have introduced the functionality to re-establish
  345. the connection. One can disable this feature through the
  346. :conf_proxy:`proxy_keep_alive` option and adjust the polling frequency
  347. speciying a custom value for :conf_proxy:`proxy_keep_alive_interval`,
  348. in minutes.
  349. New modules:
  350. - :mod:`Netconfig state module <salt.states.netconfig>` - Manage the configuration
  351. of network devices using arbitrary templates and the Salt-specific
  352. advanced templating methodologies.
  353. - :mod:`Network ACL execution module <salt.modules.napalm_acl>` - Generate and
  354. load ACL (firewall) configuration on network devices.
  355. - :mod:`Network ACL state <salt.states.netacl>` - Manage the firewall
  356. configuration. It only requires writing the pillar structure correctly!
  357. - :mod:`NAPALM YANG execution module <salt.modules.napalm_yang_mod>` - Parse,
  358. generate and load native device configuration in a standard way,
  359. using the OpenConfig/IETF models. This module contains also helpers for
  360. the states.
  361. - :mod:`NAPALM YANG state module <salt.states.netyang>` - Manage the
  362. network device configuration according to the YANG models (OpenConfig or IETF).
  363. - :mod:`NET finder <salt.runners.net>` - Runner to find details easily and
  364. fast. It's smart enough to know what you are looking for. It will search
  365. in the details of the network interfaces, IP addresses, MAC address tables,
  366. ARP tables and LLDP neighbors.
  367. - :mod:`BGP finder <salt.runners.bgp>` - Runner to search BGP neighbors details.
  368. - :mod:`NAPALM syslog <salt.engines.napalm_syslog>` - Engine to import events
  369. from the napalm-logs library into the Salt event bus. The events are based
  370. on the syslog messages from the network devices and structured following
  371. the OpenConfig/IETF YANG models.
  372. - :mod:`NAPALM Helpers <salt.modules.napalm>` - Generic helpers for
  373. NAPALM-related operations. For example, the
  374. :mod:`Compliance report <salt.modules.napalm.compliance_report>` function
  375. can be used inside the state modules to compare the expected and the
  376. existing configuration.
  377. New functions:
  378. - :mod:`Configuration getter <salt.modules.napalm_network.config>` - Return
  379. the whole configuration of the network device.
  380. - :mod:`Optics getter <salt.modules.napalm_network.optics>` - Fetches
  381. the power usage on the various transceivers installed on the network device
  382. (in dBm).
  383. New grains: :mod:`Host <salt.grains.napalm.host>`,
  384. :mod:`Host DNS<salt.grains.napalm.host_dns>`,
  385. :mod:`Username <salt.grains.napalm.username>` and
  386. :mod:`Optional args <salt.grains.napalm.optional_args>`.
  387. Custom Refspecs in GitFS / git_pillar / winrepo
  388. ===============================================
  389. It is now possible to specify the refspecs to use when fetching from remote
  390. repositories for GitFS, git_pillar, and winrepo. More information on how this
  391. feature works can be found :ref:`here <gitfs-custom-refspecs>` in the GitFS
  392. Walkthrough. The git_pillar and winrepo versions of this feature work the same
  393. as their GitFS counterpart.
  394. git_pillar "mountpoints" Feature Added
  395. ======================================
  396. See :ref:`here <git-pillar-mountpoints>` for detailed documentation.
  397. Big Improvements to Docker Support
  398. ==================================
  399. The old ``docker`` state and execution modules have been moved to
  400. salt-contrib_. The ``dockerng`` execution module has been renamed to
  401. :mod:`docker <salt.modules.docker>` and now serves as Salt's official Docker
  402. execution module.
  403. The old ``dockerng`` state module has been split into 4 state modules:
  404. - :mod:`docker_container <salt.states.docker_container>` - States to manage
  405. Docker containers
  406. - :mod:`docker_image <salt.states.docker_image>` - States to manage Docker
  407. images
  408. - :mod:`docker_volume <salt.states.docker_volume>` - States to manage
  409. Docker volumes
  410. - :mod:`docker_network <salt.states.docker_network>` - States to manage
  411. Docker networks
  412. The reason for this change was to make states and requisites more clear. For
  413. example, imagine this SLS:
  414. .. code-block:: yaml
  415. myuser/appimage:
  416. docker.image_present:
  417. - sls: docker.images.appimage
  418. myapp:
  419. docker.running:
  420. - image: myuser/appimage
  421. - require:
  422. - docker: myuser/appimage
  423. The new syntax would be:
  424. .. code-block:: yaml
  425. myuser/appimage:
  426. docker_image.present:
  427. - sls: docker.images.appimage
  428. myapp:
  429. docker_container.running:
  430. - image: myuser/appimage
  431. - require:
  432. - docker_image: myuser/appimage
  433. This is similar to how Salt handles MySQL, MongoDB, Zabbix, and other cases
  434. where the same execution module is used to manage several different kinds
  435. of objects (users, databases, roles, etc.).
  436. .. note::
  437. With the `Moby announcement`_ coming at this year's DockerCon_, Salt's
  438. :mod:`docker <salt.modules.dockermod>` execution module (as well as the
  439. state modules) work interchangeably when **docker** is replaced with
  440. **moby** (e.g. :py:func:`moby_container.running
  441. <salt.states.docker_container.running>`, :py:func:`moby_image.present
  442. <salt.states.docker_image.present>`, :py:func:`moby.inspect_container
  443. <salt.modules.dockermod.inspect_container>`, etc.)
  444. .. _`Moby announcement`: https://blog.docker.com/2017/04/introducing-the-moby-project/
  445. .. _DockerCon: http://2017.dockercon.com/
  446. The old syntax will continue to work until the **2019.2.0** release of Salt.
  447. The old ``dockerng`` naming will also continue to work until that release, so
  448. no immediate changes need to be made to your SLS files (unless you were still
  449. using the old docker states that have been moved to salt-contrib_).
  450. The :py:func:`docker_container.running <salt.states.docker_container.running>`
  451. state has undergone a significant change in how it determines whether or not a
  452. container needs to be replaced. Rather than comparing individual arguments to
  453. their corresponding values in the named container, a temporary container is
  454. created (but not started) using the passed arguments. The two containers are
  455. then compared to each other to determine whether or not there are changes, and
  456. if so, the old container is stopped and destroyed, and the temporary container
  457. is renamed and started.
  458. Salt still needs to translate arguments into the format which docker-py
  459. expects, but if it does not properly do so, the :ref:`skip_translate
  460. <docker-container-running-skip-translate>` argument can be used to skip input
  461. translation on an argument-by-argument basis, and you can then format your SLS
  462. file to pass the data in the format that the docker-py expects. This allows you
  463. to work around any changes in Docker's API or issues with the input
  464. translation, and continue to manage your Docker containers using Salt. Read the
  465. documentation for :ref:`skip_translate
  466. <docker-container-running-skip-translate>` for more information.
  467. .. note::
  468. When running the :py:func:`docker_container.running
  469. <salt.states.docker_container.running>` state for the first time after
  470. upgrading to 2017.7.0, your container(s) may be replaced. The changes may
  471. show diffs for certain parameters which say that the old value was an empty
  472. string, and the new value is ``None``. This is due to the fact that in
  473. prior releases Salt was passing empty strings for these values when
  474. creating the container if they were undefined in the SLS file, where now
  475. Salt simply does not pass any arguments not explicitly defined in the SLS
  476. file. Subsequent runs of the state should not replace the container if the
  477. configuration remains unchanged.
  478. .. _salt-contrib: https://github.com/saltstack/salt-contrib
  479. New SSH Cache Roster
  480. ====================
  481. The :mod:`SSH cache Roster <salt.roster.cache>` has been rewritten from scratch
  482. to increase its usefulness. The new roster supports all minion matchers, so it
  483. is now possible to target minions identically through `salt` and `salt-ssh`.
  484. Using the new ``roster_order`` configuration syntax it's now possible to
  485. compose a roster out of any combination of grains, pillar and mine data and
  486. even Salt SDB URLs. The new release is also fully IPv4 and IPv6 enabled and
  487. even has support for CIDR ranges.
  488. Salt-SSH Default Options
  489. ========================
  490. Defaults for rosters can now be set, so that they don't have to be set on every
  491. entry in a roster or specified from the commandline.
  492. The new option is :conf_master:`roster_defaults` and is specified in the master
  493. config file:
  494. .. code-block:: yaml
  495. roster_defaults:
  496. user: daniel
  497. sudo: True
  498. priv: /root/.ssh/id_rsa
  499. tty: True
  500. Blacklist or Whitelist Extmod Sync
  501. ==================================
  502. The modules that are synced to minions can now be limited.
  503. The following configuration options have been added for the master:
  504. - :conf_master:`extmod_whitelist`
  505. - :conf_master:`extmod_blacklist`
  506. and for the minion:
  507. - :conf_minion:`extmod_whitelist`
  508. - :conf_minion:`extmod_blacklist`
  509. Additional Features
  510. ===================
  511. - The :mod:`mine.update <salt.modules.mine.update>` function
  512. has a new optional argument ``mine_functions`` that can be used
  513. to refresh mine functions at a more specific interval
  514. than scheduled using the ``mine_interval`` option.
  515. However, this argument can be used by explicit schedule.
  516. For example, if we need the mines for ``net.lldp`` to be refreshed
  517. every 12 hours:
  518. .. code-block:: yaml
  519. schedule:
  520. lldp_mine_update:
  521. function: mine.update
  522. kwargs:
  523. mine_functions:
  524. net.lldp: []
  525. hours: 12
  526. - The ``salt`` runner has a new function: :mod:`salt.execute <salt.runners.salt.execute>`.
  527. It is mainly a shortcut to facilitate the execution of various functions
  528. from other runners, e.g.:
  529. .. code-block:: python
  530. ret1 = __salt__['salt.execute']('*', 'mod.fun')
  531. New Modules
  532. ===========
  533. Beacons
  534. -------
  535. - :mod:`salt.beacons.log <salt.beacons.log>`
  536. Cache
  537. -----
  538. - :mod:`salt.cache.redis_cache <salt.cache.redis_cache>`
  539. Engines
  540. -------
  541. - :mod:`salt.engines.stalekey <salt.engines.stalekey>`
  542. - :mod:`salt.engines.junos_syslog <salt.engines.junos_syslog>`
  543. - :mod:`salt.engines.napalm_syslog <salt.engines.napalm_syslog>`
  544. Execution modules
  545. -----------------
  546. - :mod:`salt.modules.apk <salt.modules.apk>`
  547. - :mod:`salt.modules.at_solaris <salt.modules.at_solaris>`
  548. - :mod:`salt.modules.boto_kinesis <salt.modules.boto_kinesis>`
  549. - :mod:`salt.modules.boto3_elasticache <salt.modules.boto3_elasticache>`
  550. - :mod:`salt.modules.boto3_route53 <salt.modules.boto3_route53>`
  551. - :mod:`salt.modules.capirca_acl <salt.modules.capirca_acl>`
  552. - :mod:`salt.modules.freebsd_update <salt.modules.freebsd_update>`
  553. - :mod:`salt.modules.grafana4 <salt.modules.grafana4>`
  554. - :mod:`salt.modules.heat <salt.modules.heat>`
  555. - :mod:`salt.modules.icinga2 <salt.modules.icinga2>`
  556. - :mod:`salt.modules.kubernetesmod <salt.modules.kubernetesmod>`
  557. - :mod:`salt.modules.logmod <salt.modules.logmod>`
  558. - :mod:`salt.modules.mattermost <salt.modules.mattermost>`
  559. - :mod:`salt.modules.namecheap_dns <salt.modules.namecheap_dns>`
  560. - :mod:`salt.modules.namecheap_domains <salt.modules.namecheap_domains>`
  561. - :mod:`salt.modules.namecheap_ns <salt.modules.namecheap_ns>`
  562. - :mod:`salt.modules.namecheap_users <salt.modules.namecheap_users>`
  563. - :mod:`salt.modules.namecheap_ssl <salt.modules.namecheap_ssl>`
  564. - :mod:`salt.modules.napalm <salt.modules.napalm>`
  565. - :mod:`salt.modules.napalm_acl <salt.modules.napalm_acl>`
  566. - :mod:`salt.modules.napalm_yang_mod <salt.modules.napalm_yang_mod>`
  567. - :mod:`salt.modules.pdbedit <salt.modules.pdbedit>`
  568. - :mod:`salt.modules.solrcloud <salt.modules.solrcloud>`
  569. - :mod:`salt.modules.statuspage <salt.modules.statuspage>`
  570. - :mod:`salt.modules.zonecfg <salt.modules.zonecfg>`
  571. - :mod:`salt.modules.zoneadm <salt.modules.zoneadm>`
  572. Grains
  573. ------
  574. - :mod:`salt.grains.metadata <salt.grains.metadata>`
  575. - :mod:`salt.grains.mdata <salt.grains.mdata>`
  576. Outputters
  577. ----------
  578. - :mod:`salt.output.table_out <salt.output.table_out>`
  579. Pillar
  580. ------
  581. - :mod:`salt.pillar.postgres <salt.pillar.postgres>`
  582. - :mod:`salt.pillar.vmware_pillar <salt.pillar.vmware_pillar>`
  583. Returners
  584. ---------
  585. - :mod:`salt.returners.mattermost_returner <salt.returners.mattermost_returner>`
  586. - :mod:`salt.returners.highstate_return <salt.returners.highstate_return>`
  587. Roster
  588. ------
  589. - :mod:`salt.roster.cache <salt.roster.cache>`
  590. Runners
  591. -------
  592. - :mod:`salt.runners.bgp <salt.runners.bgp>`
  593. - :mod:`salt.runners.mattermost <salt.runners.mattermost>`
  594. - :mod:`salt.runners.net <salt.runners.net>`
  595. SDB
  596. ---
  597. - :mod:`salt.sdb.yaml <salt.sdb.yaml>`
  598. - :mod:`salt.sdb.tism <salt.sdb.tism>`
  599. - :mod:`salt.sdb.cache <salt.sdb.cache>`
  600. States
  601. ------
  602. - :mod:`salt.states.boto_kinesis <salt.states.boto_kinesis>`
  603. - :mod:`salt.states.boto_efs <salt.states.boto_efs>`
  604. - :mod:`salt.states.boto3_elasticache <salt.states.boto3_elasticache>`
  605. - :mod:`salt.states.boto3_route53 <salt.states.boto3_route53>`
  606. - :mod:`salt.states.docker_container <salt.states.docker_container>`
  607. - :mod:`salt.states.docker_image <salt.states.docker_image>`
  608. - :mod:`salt.states.docker_network <salt.states.docker_network>`
  609. - :mod:`salt.states.docker_volume <salt.states.docker_volume>`
  610. - :mod:`salt.states.elasticsearch <salt.states.elasticsearch>`
  611. - :mod:`salt.states.grafana4_dashboard <salt.states.grafana4_dashboard>`
  612. - :mod:`salt.states.grafana4_datasource <salt.states.grafana4_datasource>`
  613. - :mod:`salt.states.grafana4_org <salt.states.grafana4_org>`
  614. - :mod:`salt.states.grafana4_user <salt.states.grafana4_user>`
  615. - :mod:`salt.states.heat <salt.states.heat>`
  616. - :mod:`salt.states.icinga2 <salt.states.icinga2>`
  617. - :mod:`salt.states.influxdb_continuous_query <salt.states.influxdb_continuous_query>`
  618. - :mod:`salt.states.influxdb_retention_policy <salt.states.influxdb_retention_policy>`
  619. - :mod:`salt.states.kubernetes <salt.states.kubernetes>`
  620. - :mod:`salt.states.logadm <salt.states.logadm>`
  621. - :mod:`salt.states.logrotate <salt.states.logrotate>`
  622. - :mod:`salt.states.msteams <salt.states.msteams>`
  623. - :mod:`salt.states.netacl <salt.states.netacl>`
  624. - :mod:`salt.states.netconfig <salt.states.netconfig>`
  625. - :mod:`salt.states.netyang <salt.states.netyang>`
  626. - :mod:`salt.states.nix <salt.states.nix>`
  627. - :mod:`salt.states.pdbedit <salt.states.pdbedit>`
  628. - :mod:`salt.states.solrcloud <salt.states.solrcloud>`
  629. - :mod:`salt.states.statuspage <salt.states.statuspage>`
  630. - :mod:`salt.states.vault <salt.states.vault>`
  631. - :mod:`salt.states.win_wua <salt.states.win_wua>`
  632. - :mod:`salt.states.zone <salt.states.zone>`
  633. Deprecations
  634. ============
  635. General Deprecations
  636. --------------------
  637. - Removed support for aliasing ``cmd.run`` to ``cmd.shell``.
  638. - Removed support for Dulwich from :ref:`GitFS <tutorial-gitfs>`.
  639. - Beacon configurations should be lists instead of dictionaries.
  640. - The ``PidfileMixin`` has been removed. Please use ``DaemonMixIn`` instead.
  641. - The ``use_pending`` argument was removed from the ``salt.utils.event.get_event``
  642. function.
  643. - The ``pending_tags`` argument was removed from the ``salt.utils.event.get_event``
  644. function.
  645. Configuration Option Deprecations
  646. ---------------------------------
  647. - The ``client_acl`` configuration option has been removed. Please use
  648. ``publisher_acl`` instead.
  649. - The ``client_acl_blacklist`` configuration option has been removed.
  650. Please use ``publisher_acl_blacklist`` instead.
  651. - The ``win_gitrepos`` configuration option has been removed. Please use
  652. the ``winrepo_remotes`` option instead.
  653. - The ``win_repo`` configuration option has been removed. Please use
  654. ``winrepo_dir`` instead.
  655. - The ``win_repo_mastercachefile`` configuration option has been removed.
  656. Please use the ``winrepo_cachefile`` option instead.
  657. Module Deprecations
  658. -------------------
  659. The ``git`` execution module had the following changes:
  660. - The ``fmt`` argument was removed from the ``archive`` function. Please
  661. use ``format`` instead.
  662. - The ``repository`` argument was removed from the ``clone`` function.
  663. Please use ``url`` instead.
  664. - The ``is_global`` argument was removed from the ``config_set`` function.
  665. Please use ``global`` instead.
  666. - The ``branch`` argument was removed from the ``merge`` function. Please
  667. use ``rev`` instead.
  668. - The ``branch`` argument was removed from the ``push`` function. Please
  669. use ``rev`` instead.
  670. The ``glusterfs`` execution module had the following functions removed:
  671. - ``create``: Please use ``create_volume`` instead.
  672. - ``delete``: Please use ``delete_volume`` instead.
  673. - ``list_peers``: Please use ``peer_status`` instead.
  674. The ``htpasswd`` execution module had the following function removed:
  675. - ``useradd_all``: Please use ``useradd`` instead.
  676. The ``img`` execution module has been removed. All of its associated functions
  677. were marked for removal in the 2017.7.0 release. The functions removed in this
  678. module are mapped as follows:
  679. - ``mount_image``/``mnt_image``: Please use ``mount.mount`` instead.
  680. - ``umount_image``: Please use ``mount.umount`` instead.
  681. - ``bootstrap``: Please use ``genesis.bootstrap`` instead.
  682. The ``smartos_virt`` execution module had the following functions removed:
  683. - ``create``: Please use ``start`` instead.
  684. - ``destroy`` Please use ``stop`` instead.
  685. - ``list_vms``: Please use ``list_domains`` instead.
  686. The ``virt`` execution module had the following functions removed:
  687. - ``create``: Please use ``start`` instead.
  688. - ``destroy`` Please use ``stop`` instead.
  689. - ``list_vms``: Please use ``list_domains`` instead.
  690. The ``virtualenv_mod`` execution module had the following changes:
  691. - The ``package_or_requirement`` argument was removed from both the
  692. ``get_resource_path`` and the ``get_resource_content`` functions.
  693. Please use ``package`` instead.
  694. - The ``resource_name`` argument was removed from both the
  695. ``get_resource_path`` and ``get_resource_content`` functions.
  696. Please use ``resource`` instead.
  697. The ``win_repo`` execution module had the following changes:
  698. - The ``win_repo_source_dir`` option was removed from the ``win_repo``
  699. module. Please use ``winrepo_source_dir`` instead.
  700. The ``xapi`` execution module had the following functions removed:
  701. - ``create``: Please use ``start`` instead.
  702. - ``destroy``: Please use ``stop`` instead.
  703. - ``list_vms``: Please use ``list_domains`` instead.
  704. The ``zypper`` execution module had the following function removed:
  705. - ``info``: Please use ``info_available`` instead.
  706. Pillar Deprecations
  707. -------------------
  708. - Support for the ``raw_data`` argument for the file_tree ext_pillar has been
  709. removed. Please use ``keep_newline`` instead.
  710. - SQLite3 database connection configuration previously had keys under
  711. pillar. This legacy compatibility has been removed.
  712. Proxy Minion Deprecations
  713. -------------------------
  714. - The ``proxy_merge_grains_in_module`` default has been switched from
  715. ``False`` to ``True``.
  716. Salt-API Deprecations
  717. ---------------------
  718. - The ``SaltAPI.run()`` function has been removed. Please use the
  719. ``SaltAPI.start()`` function instead.
  720. Salt-Cloud Deprecations
  721. -----------------------
  722. - Support for using the keyword ``provider`` in salt-cloud provider config
  723. files has been removed. Please use ``driver`` instead. The ``provider``
  724. keyword should now only be used in cloud profile config files.
  725. Salt-SSH Deprecations
  726. ---------------------
  727. - The ``wipe_ssh`` option for ``salt-ssh`` has been removed. Please use the
  728. ``ssh_wipe`` option instead.
  729. State Deprecations
  730. ------------------
  731. The ``apache_conf`` state had the following functions removed:
  732. - ``disable``: Please use ``disabled`` instead.
  733. - ``enable``: Please use ``enabled`` instead.
  734. The ``apache_module`` state had the following functions removed:
  735. - ``disable``: Please use ``disabled`` instead.
  736. - ``enable``: Please use ``enabled`` instead.
  737. The ``apache_site`` state had the following functions removed:
  738. - ``disable``: Please use ``disabled`` instead.
  739. - ``enable``: Please use ``enabled`` instead.
  740. The ``chocolatey`` state had the following functions removed:
  741. - ``install``: Please use ``installed`` instead.
  742. - ``uninstall``: Please use ``uninstalled`` instead.
  743. The ``git`` state had the following changes:
  744. - The ``config`` function was removed. Please use ``config_set`` instead.
  745. - The ``is_global`` option was removed from the ``config_set`` function.
  746. Please use ``global`` instead.
  747. - The ``always_fetch`` option was removed from the ``latest`` function, as
  748. it no longer has any effect. Please see the :ref:`2015.8.0<release-2015-8-0>`
  749. release notes for more information.
  750. - The ``force`` option was removed from the ``latest`` function. Please
  751. use ``force_clone`` instead.
  752. - The ``remote_name`` option was removed from the ``latest`` function.
  753. Please use ``remote`` instead.
  754. The ``glusterfs`` state had the following function removed:
  755. - ``created``: Please use ``volume_present`` instead.
  756. The ``openvswitch_port`` state had the following change:
  757. - The ``type`` option was removed from the ``present`` function. Please use ``tunnel_type`` instead.
  758. Build Notes
  759. ===========
  760. Windows Installer Packages
  761. --------------------------
  762. Windows Installer packages have been patched with the following PR: 42347_
  763. .. _42347: https://github.com/saltstack/salt/pull/42347