1
0

2016.11.0.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. .. _release-2016-11-0:
  2. ==============================================
  3. Salt 2016.11.0 Release Notes - Codename Carbon
  4. ==============================================
  5. New Features
  6. ============
  7. Docker Introspection and Configuration
  8. --------------------------------------
  9. Major additions have been made to the Docker support in 2016.11.0. The new
  10. addition allows Salt to be executed within a Docker container without a
  11. minion running or installed in the container. This allows states to
  12. be run inside a container, but also all of Salt's remote execution
  13. commands to be run inside docker containers as well. This makes
  14. container introspection simple and powerful. See the tutorial on using
  15. this new feature here:
  16. See :ref:`Salt in Docker Containers <docker-sls>`.
  17. Advanced Ceph Control
  18. ---------------------
  19. Our friends over at SUSE have delivered a powerful new tool to make the
  20. deployment of Ceph storage systems using Salt very easy. These new Ceph
  21. tools allow for a storage system to be easily defined using the new
  22. `ceph.quorum` state.
  23. Thorium Additions and Improvements
  24. ----------------------------------
  25. The Thorium advanced reactor has undergone extensive testing and updates.
  26. These updates include many more Thorium states, a system for automating
  27. key management, the ability to use Thorium to easily replace old
  28. reactors and a great deal of stability and bug fixes.
  29. State Rollback Using Snapper
  30. ----------------------------
  31. Rollback has been one of the most prevalent requests for Salt. We
  32. have researched it extensively and concluded that the only way to
  33. accomplish truly reliable rollback would be to execute it at
  34. the filesystem layer. To accomplish this we have introduced Snapper
  35. integration into Salt States.
  36. Snapper is a tool which allows for simple and reliable snapshots
  37. of the filesystem to be made. With the new `snapper_states` option
  38. set to `True` in the minion config a snapshot will be made before
  39. and after every Salt State run.
  40. These snapshots can be viewed, managed and rolled back to via the
  41. `snapper` execution module.
  42. Preserve File Perms in File States
  43. ----------------------------------
  44. This feature has been requested for years, the ability to set a flag
  45. and use the same file permissions for files deployed to a minion as
  46. the permissions set to the file on the master. Just set the `keep_mode`
  47. option on any file management state to `True`.
  48. Ponies!
  49. -------
  50. We all agreed that cowsay was just not good enough, install the `ponysay`
  51. command and the new `pony` outputter will work. Fun for the whole family!
  52. Additional Features
  53. -------------------
  54. - Minions can run in stand-alone mode to use beacons and engines without
  55. having to connect to a master. (Thanks @adelcast!)
  56. - Added a ``salt`` runner to allow running salt modules via salt-run.
  57. .. code-block:: bash
  58. salt-run salt.cmd test.ping
  59. # call functions with arguments and keyword arguments
  60. salt-run salt.cmd test.arg 1 2 3 a=1
  61. - Added SSL support to Cassandra CQL returner.
  62. SSL can be enabled by setting ``ssl_options`` for the returner.
  63. Also added support for specifying ``protocol_version`` when establishing
  64. cluster connection.
  65. - The ``mode`` parameter in the :py:mod:`file.managed
  66. <salt.states.file.managed>` state, and the ``file_mode`` parameter in the
  67. :py:mod:`file.recurse <salt.states.file.recurse>` state, can both now be set
  68. to ``keep`` and the minion will keep the mode of the file from the Salt
  69. fileserver. This works only with files coming from sources prefixed with
  70. ``salt://``, or files local to the minion (i.e. those which are absolute
  71. paths, or are prefixed with ``file://``). For example:
  72. .. code-block:: yaml
  73. /etc/myapp/myapp.conf:
  74. file.managed:
  75. - source: salt://conf/myapp/myapp.conf
  76. - mode: keep
  77. /var/www/myapp:
  78. file.recurse:
  79. - source: salt://path/to/myapp
  80. - dir_mode: 755
  81. - file_mode: keep
  82. - The ``junos`` state module is now available. It has all the functions
  83. that are present in the ``junos`` execution module.
  84. - The ``junos`` state module is now available. It has all the functions
  85. that are present in the ``junos`` execution module.
  86. - The minion data cache is a pluggable data store now. It's configurable with
  87. :conf_master:`cache` option. Default is ``localfs``.
  88. - User names in :conf_master:`client_acl` support glob matching now.
  89. New Top File Merging Strategy for States
  90. ========================================
  91. A new strategy called ``merge_all`` has been added to provide a new way of
  92. merging top file matches when executing a :ref:`highstate <running-highstate>`.
  93. See the :conf_master:`top_file_merging_strategy` documentation for further
  94. information.
  95. In addition, the ``same`` merging strategy was not functioning as documented.
  96. This has now been corrected. While this is technically a bugfix, we decided to
  97. hold a change in top file merging until a feature release to minimize user
  98. impact.
  99. Improved Archive Extraction Support
  100. ===================================
  101. The :py:func:`archive.extracted <salt.states.archive.extracted>` state has been
  102. overhauled. Notable changes include the following:
  103. - When enforcing ownership (with the ``user`` and/or ``group`` arguments), the
  104. ``if_missing`` argument no longer has any connection to which path(s) have
  105. ownership enforced. Instead, the paths are determined using the either the
  106. newly-added :py:func:`archive.list <salt.modules.archive.list_>` function, or
  107. the newly-added ``enforce_ownership_on`` argument.
  108. - ``if_missing`` also is no longer required to skip extraction, as Salt is now
  109. able to tell which paths would be present if the archive were extracted. It
  110. should, in most cases, only be necessary in cases where a semaphore file is
  111. used to conditionally skip extraction of the archive.
  112. - Password-protected ZIP archives are now detected before extraction, and the
  113. state fails without attempting to extract the archive if no password was
  114. specified.
  115. - By default, a single top-level directory is enforced, to guard against
  116. 'tar-bombs'. This enforcement can be disabled by setting ``enforce_toplevel``
  117. to ``False``.
  118. - The ``tar_options`` and ``zip_options`` arguments have been deprecated in
  119. favor of a single ``options`` argument.
  120. - The ``archive_format`` argument is now optional. The ending of the ``source``
  121. argument is used to guess whether it is a tar, zip or rar file. If the
  122. ``archive_format`` cannot be guessed, then it will need to be specified, but
  123. in many cases it can now be omitted.
  124. - Ownership enforcement is now performed irrespective of whether or not the
  125. archive needed to be extracted. This means that the state can be re-run after
  126. the archive has been fully extracted to repair changes to ownership.
  127. A number of new arguments were also added. See the docs py:func:`docs for the
  128. archive.extracted state <salt.states.archive.extracted>` for more information.
  129. Additionally, the following changes have been made to the :mod:`archive
  130. <salt.modules.archive>` execution module:
  131. - A new function (:py:func:`archive.list <salt.modules.archive.list_>`) has
  132. been added. This function lists the files/directories in an archive file, and
  133. supports a ``verbose`` argument that gives a more detailed breakdown of which
  134. paths are files, which are directories, and which paths are at the top level
  135. of the archive.
  136. - A new function (:py:func:`archive.is_encrypted
  137. <salt.modules.archive.is_encrypted>`) has been added. This function will
  138. return ``True`` if the archive is a password-protected ZIP file, ``False`` if
  139. not. If the archive is not a ZIP file, an error will be raised.
  140. - :py:func:`archive.cmd_unzip <salt.modules.archive.cmd_unzip>` now supports
  141. passing a password, bringing it to feature parity with
  142. :py:func:`archive.unzip <salt.modules.archive.unzip>`. Note that this is
  143. still not considered to be secure, and :py:func:`archive.unzip
  144. <salt.modules.archive.unzip>` is recommended for dealing with
  145. password-protected ZIP archives.
  146. - The default value for the ``extract_perms`` argument to
  147. :py:func:`archive.unzip <salt.modules.archive.unzip>` has been changed to
  148. ``True``.
  149. Improved Checksum Handling in :py:func:`file.managed <salt.states.file.managed>`, :py:func:`archive.extracted <salt.states.archive.extracted>` States
  150. -----------------------------------------------------------------------------------------------------------------------------------------------------
  151. When the ``source_hash`` argument for these states refers to a file containing
  152. checksums, Salt now looks for checksums matching the name of the source URI, as
  153. well as the file being managed. Prior releases only looked for checksums
  154. matching the filename being managed. Additionally, a new argument
  155. (``source_hash_name``) has been added, which allows the user to disambiguate
  156. ambiguous matches when more than one matching checksum is found in the
  157. ``source_hash`` file.
  158. A more detailed explanation of this functionality can be found in the
  159. :py:func:`file.managed <salt.states.file.managed>` documentation, in the
  160. section for the new ``source_hash_name`` argument.
  161. .. note::
  162. This improved functionality is also available in the ``2016.3`` (Boron)
  163. release cycle, starting with the 2016.3.5 release.
  164. Config Changes
  165. ==============
  166. The following default config values were changed:
  167. - ``gitfs_ssl_verify``: Changed from ``False`` to ``True``
  168. - ``git_pillar_ssl_verify``: Changed from ``False`` to ``True``
  169. - ``winrepo_ssl_verify``: Changed from ``False`` to ``True``
  170. Grains Changes
  171. ==============
  172. - All core grains containing ``VMWare`` have been changed to ``VMware``, which
  173. is the `official capitalization <https://www.vmware.com>`_. Additionally,
  174. all references to ``VMWare`` in the documentation have been changed to
  175. ``VMware`` :issue:`30807`. Environments using versions of Salt before and
  176. after Salt 2016.11.0 should employ case-insensitive grain matching on these
  177. grains.
  178. .. code-block:: jinja
  179. {% set on_vmware = grains['virtual'].lower() == 'vmware' %}
  180. - On Windows the ``cpu_model`` grain has been changed to provide the actual cpu
  181. model name and not the cpu family.
  182. Old behavior:
  183. .. code-block:: bash
  184. root@master:~# salt 'testwin200' grains.item cpu_model
  185. testwin200:
  186. ----------
  187. cpu_model:
  188. Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
  189. New behavior:
  190. .. code-block:: bash
  191. root@master:~# salt 'testwin200' grains.item cpu_model
  192. testwin200:
  193. ----------
  194. cpu_model:
  195. Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
  196. Beacons Changes
  197. ===============
  198. - The ``loadavg`` beacon now outputs averages as integers instead of strings.
  199. (Via :issue:`31124`.)
  200. Runner Changes
  201. ==============
  202. - Runners can now call out to :ref:`utility modules <writing-utility-modules>`
  203. via ``__utils__``.
  204. - ref:`Utility modules <writing-utility-modules>` (placed in
  205. ``salt://_utils/``) are now able to be synced to the master, making it easier
  206. to use them in custom runners. A :py:mod:`saltutil.sync_utils
  207. <salt.runners.saltutil.sync_utils>` function has been added to the
  208. :py:mod:`saltutil runner <salt.runners.saltutil>` to facilitate the syncing of
  209. utility modules to the master.
  210. Pillar Changes
  211. ==============
  212. - Thanks to the new :py:mod:`saltutil.sync_utils
  213. <salt.runners.saltutil.sync_utils>` runner, it is now easier to get
  214. ref:`utility modules <writing-utility-modules>` synced to the correct
  215. location on the Master so that they are available in execution modules called
  216. from Pillar SLS files.
  217. Junos Module Changes
  218. ====================
  219. - The following new functionalities were added to the junos module
  220. - facts - Displays the facts gathered during the connection.
  221. - shutdown - Shut down or reboot a device running Junos OS.
  222. - install_config - Modify the configuration of a Junos device.
  223. - install_os - Install Junos OS software package.
  224. - zeroize - Remove all configuration information on the Routing Engines and reset all key values on a device.
  225. - file_copy - Copy file from proxy to the Junos device.
  226. .. _release-2016-11-0-network-automation-napalm:
  227. Network Automation: NAPALM
  228. ==========================
  229. Beginning with 2016.11.0, network automation is included by default in the core
  230. of Salt. It is based on a the `NAPALM <https://github.com/napalm-automation/napalm>`_
  231. library and provides facilities to manage the configuration and retrieve data
  232. from network devices running widely used operating systems such: JunOS, IOS-XR,
  233. eOS, IOS, NX-OS etc.
  234. - see `the complete list of supported devices
  235. <http://napalm.readthedocs.io/en/latest/support/index.html#supported-devices>`_.
  236. The connection is established via the :mod:`NAPALM proxy <salt.proxy.napalm>`.
  237. In the current release, the following modules were included:
  238. - :mod:`NAPALM grains <salt.grains.napalm>` - Select network devices based on their characteristics
  239. - :mod:`NET execution module <salt.modules.napalm_network>` - Networking basic features
  240. - :mod:`NTP execution module <salt.modules.napalm_ntp>`
  241. - :mod:`BGP execution module <salt.modules.napalm_bgp>`
  242. - :mod:`Routes execution module <salt.modules.napalm_route>`
  243. - :mod:`SNMP execution module <salt.modules.napalm_snmp>`
  244. - :mod:`Users execution module <salt.modules.napalm_users>`
  245. - :mod:`Probes execution module <salt.modules.napalm_probes>`
  246. - :mod:`NTP peers management state <salt.states.netntp>`
  247. - :mod:`SNMP configuration management state <salt.states.netsnmp>`
  248. - :mod:`Users management state <salt.states.netusers>`
  249. Cisco NXOS Proxy Minion
  250. =======================
  251. Beginning with 2016.11.0, there is a proxy minion that can be used to configure
  252. nxos cisco devices over ssh.
  253. - :mod:`Proxy Minion <salt.proxy.nxos>`
  254. - :mod:`Execution Module <salt.modules.nxos>`
  255. - :mod:`State Module <salt.states.nxos>`
  256. Cisco Network Services Orchestrator Proxy Minion
  257. ================================================
  258. Beginning with 2016.11.0, there is a proxy minion to use the Cisco Network
  259. Services Orchestrator as a proxy minion.
  260. - :mod:`Proxy Minion <salt.proxy.cisconso>`
  261. - :mod:`Execution Module <salt.modules.cisconso>`
  262. - :mod:`State Module <salt.states.cisconso>`
  263. Junos Module Changes
  264. ====================
  265. - The following new functionalities were added to the junos module
  266. - facts - Displays the facts gathered during the connection.
  267. - shutdown - Shut down or reboot a device running Junos OS.
  268. - install_config - Modify the configuration of a Junos device.
  269. - install_os - Install Junos OS software package.
  270. - zeroize - Remove all configuration information on the Routing Engines and reset all key values on a device.
  271. - file_copy - Copy file from proxy to the Junos device.
  272. Returner Changes
  273. ================
  274. - Any returner which implements a `save_load` function is now required to
  275. accept a `minions` keyword argument. All returners which ship with Salt
  276. have been modified to do so.
  277. Renderer Changes
  278. ================
  279. Added the ability to restrict allowed renderers. Two new config parameters,
  280. :conf_master:`renderer_whitelist` and :conf_master:`renderer_blacklist` are
  281. introduced for this purpose.
  282. eAuth Changes
  283. =============
  284. - External auth modules' ``auth`` method can return an ACL list for the given
  285. username instead of ``True``. This list should be in the same format as
  286. described in the :ref:`eAuth documentation <acl-eauth>`. It will be
  287. used for the user instead of one set in master config.
  288. Example of the ``auth`` method return that allows a user to execute functions
  289. in the ``test`` and ``network`` modules on the minions that match the ``web*``
  290. target and allow access to ``wheel`` and ``runner`` modules:
  291. .. code-block:: python
  292. [{'web*': ['test.*',
  293. 'network.*']},
  294. '@wheel',
  295. '@runner']
  296. - External auth is supported by :ref:`salt-run <salt-run>` and
  297. :ref:`salt-key <salt-key>` now. Note that master must be started to
  298. use them with eAuth.
  299. External Module Packaging
  300. =========================
  301. Modules may now be packaged via entry-points in setuptools. See
  302. :ref:`external module packaging <tutorial-packaging-modules>` tutorial
  303. for more information.
  304. Functionality Changes
  305. =====================
  306. - The ``onfail`` requisite now uses OR logic instead of AND logic.
  307. :issue:`22370`
  308. - The consul external pillar now strips leading and trailing whitespace.
  309. :issue:`31165`
  310. - The win_system.py state is now case sensitive for computer names. Previously
  311. computer names set with a state were converted to all caps. If you have a
  312. state setting computer names with lower case letters in the name that has
  313. been applied, the computer name will be changed again to apply the case
  314. sensitive name.
  315. - The ``mac_user.list_groups`` function in the ``mac_user`` execution module
  316. now lists all groups for the specified user, including groups beginning with
  317. an underscore. In previous releases, groups beginning with an underscore were
  318. excluded from the list of groups.
  319. - The ``junos.call_rpc`` function in the ``junos`` execution module can now be used
  320. to call any valid rpc. Earlier it used to call only "get_software_information".
  321. - A new option for minions called ``master_tries`` has been added. This
  322. specifies the number of times a minion should attempt to contact a master to
  323. attempt a connection. This allows better handling of occasional master
  324. downtime in a multi-master topology.
  325. - The default hash_type is now sha256 instead of md5. You will need to make sure both
  326. your master and minion share the same hash_type.
  327. - Nodegroups consisting of a simple list of minion IDs can now also be declared
  328. as a yaml list. The below two examples are equivalent:
  329. .. code-block:: yaml
  330. # Traditional way
  331. nodegroups:
  332. - group1: L@host1,host2,host3
  333. # New way (optional)
  334. nodegroups:
  335. - group1:
  336. - host1
  337. - host2
  338. - host3
  339. New Azure ARM Cloud Driver
  340. ==========================
  341. A new cloud driver has been added for Azure ARM, aka, the Azure Resource
  342. Manager. The older Azure driver is still required to work with the older Azure
  343. API. This new driver works with the newer ARM API, which is managed via the
  344. newer Azure Portal website.
  345. New Modules
  346. ===========
  347. Beacons
  348. -------
  349. - :mod:`salt.beacons.avahi_announce <salt.beacons.avahi_announce>`
  350. - :mod:`salt.beacons.bonjour_announce <salt.beacons.bonjour_announce>`
  351. - :mod:`salt.beacons.haproxy <salt.beacons.haproxy>`
  352. - :mod:`salt.beacons.status <salt.beacons.status>`
  353. Clouds
  354. ------
  355. - :mod:`salt.cloud.clouds.azurearm <salt.cloud.clouds.azurearm>`
  356. Engines
  357. -------
  358. - :mod:`salt.engines.hipchat <salt.engines.hipchat>`
  359. - :mod:`salt.engines.http_logstash <salt.engines.http_logstash>`
  360. Modules
  361. -------
  362. - :mod:`salt.modules.boto_cloudwatch_event <salt.modules.boto_cloudwatch_event>`
  363. - :mod:`salt.modules.celery <salt.modules.celery>`
  364. - :mod:`salt.modules.ceph <salt.modules.ceph>`
  365. - :mod:`salt.modules.influx08 <salt.modules.influx08>`
  366. - :mod:`salt.modules.inspectlib.entities <salt.modules.inspectlib.entities>`
  367. - :mod:`salt.modules.inspectlib.fsdb <salt.modules.inspectlib.fsdb>`
  368. - :mod:`salt.modules.inspectlib.kiwiproc <salt.modules.inspectlib.kiwiproc>`
  369. - :mod:`salt.modules.inspector <salt.modules.inspector>`
  370. - :mod:`salt.modules.libcloud_dns <salt.modules.libcloud_dns>`
  371. - :mod:`salt.modules.openstack_mng <salt.modules.openstack_mng>`
  372. - :mod:`salt.modules.servicenow <salt.modules.servicenow>`
  373. - :mod:`salt.modules.testinframod <salt.modules.testinframod>`
  374. - :mod:`salt.modules.win_lgpo <salt.modules.win_lgpo>`
  375. - :mod:`salt.modules.win_pki <salt.modules.win_pki>`
  376. - :mod:`salt.modules.win_psget <salt.modules.win_psget>`
  377. - :mod:`salt.modules.win_snmp <salt.modules.win_snmp>`
  378. - :mod:`salt.modules.xbpspkg <salt.modules.xbpspkg>`
  379. Outputters
  380. ----------
  381. - :mod:`salt.output.pony <salt.output.pony>`
  382. Pillar
  383. ------
  384. - :mod:`salt.pillar.csvpillar <salt.pillar.csvpillar>`
  385. - :mod:`salt.pillar.http_json <salt.pillar.http_json>`
  386. - :mod:`salt.pillar.makostack <salt.pillar.makostack>`
  387. Returners
  388. ---------
  389. - :mod:`salt.returners.zabbix_return <salt.returners.zabbix_return>`
  390. Runners
  391. -------
  392. - :mod:`salt.runners.auth <salt.runners.auth>`
  393. - :mod:`salt.runners.event <salt.runners.event>`
  394. - :mod:`salt.runners.smartos_vmadm <salt.runners.smartos_vmadm>`
  395. - :mod:`salt.runners.vistara <salt.runners.vistara>`
  396. SDB
  397. ---
  398. - :mod:`salt.sdb.env <salt.sdb.env>`
  399. States
  400. ------
  401. - :mod:`salt.states.boto_cloudwatch_event <salt.states.boto_cloudwatch_event>`
  402. - :mod:`salt.states.csf <salt.states.csf>`
  403. - :mod:`salt.states.ethtool <salt.states.ethtool>`
  404. - :mod:`salt.states.influxdb08_database <salt.states.influxdb08_database>`
  405. - :mod:`salt.states.influxdb08_user <salt.states.influxdb08_user>`
  406. - :mod:`salt.states.libcloud_dns <salt.states.libcloud_dns>`
  407. - :mod:`salt.states.snapper <salt.states.snapper>`
  408. - :mod:`salt.states.testinframod <salt.states.testinframod>`
  409. - :mod:`salt.states.win_lgpo <salt.states.win_lgpo>`
  410. - :mod:`salt.states.win_pki <salt.states.win_pki>`
  411. - :mod:`salt.states.win_snmp <salt.states.win_snmp>`
  412. Thorium
  413. -------
  414. - :mod:`salt.thorium.calc <salt.thorium.calc>`
  415. - :mod:`salt.thorium.key <salt.thorium.key>`
  416. - :mod:`salt.thorium.runner <salt.thorium.runner>`
  417. - :mod:`salt.thorium.status <salt.thorium.status>`
  418. - :mod:`salt.thorium.wheel <salt.thorium.wheel>`
  419. Deprecations
  420. ============
  421. General Deprecations
  422. --------------------
  423. - ``env`` to ``saltenv``
  424. All occurrences of ``env`` and some occurrences of ``__env__`` marked for
  425. deprecation in Salt 2016.11.0 have been removed. The new way to use the salt
  426. environment setting is with a variable called ``saltenv``:
  427. .. code-block:: python
  428. def fcn(msg='', env='base', refresh=True, saltenv='base', **kwargs):
  429. has been changed to
  430. .. code-block:: python
  431. def fcn(msg='', refresh=True, saltenv='base', **kwargs):
  432. - If ``env`` (or ``__env__``) is supplied as a keyword argument to a function
  433. that also accepts arbitrary keyword arguments, then a new warning informs the
  434. user that ``env`` is no longer used if it is found. This new warning will be
  435. removed in Salt 2017.7.0.
  436. .. code-block:: python
  437. def fcn(msg='', refresh=True, saltenv='base', **kwargs):
  438. .. code-block:: python
  439. # will result in a warning log message
  440. fcn(msg='add more salt', env='prod', refresh=False)
  441. - If ``env`` (or ``__env__``) is supplied as a keyword argument to a function
  442. that does not accept arbitrary keyword arguments, then python will issue an
  443. error.
  444. .. code-block:: python
  445. def fcn(msg='', refresh=True, saltenv='base'):
  446. .. code-block:: python
  447. # will result in a python TypeError
  448. fcn(msg='add more salt', env='prod', refresh=False)
  449. - If ``env`` (or ``__env__``) is supplied as a positional argument to a
  450. function, then undefined behavior will occur, as the removal of ``env`` and
  451. ``__env__`` from the function's argument list changes the function's
  452. signature.
  453. .. code-block:: python
  454. def fcn(msg='', refresh=True, saltenv='base'):
  455. .. code-block:: python
  456. # will result in refresh evaluating to True and saltenv likely not being a string at all
  457. fcn('add more salt', 'prod', False)
  458. - Deprecations in ``minion.py``:
  459. - The ``salt.minion.parse_args_and_kwargs`` function has been removed. Please
  460. use the ``salt.minion.load_args_and_kwargs`` function instead.
  461. Cloud Deprecations
  462. ------------------
  463. - The ``vsphere`` cloud driver has been removed. Please use the ``vmware`` cloud driver
  464. instead.
  465. - The ``private_ip`` option in the ``linode`` cloud driver is deprecated and has been
  466. removed. Use the ``assign_private_ip`` option instead.
  467. - The ``create_dns_record`` and ``delete_dns_record`` functions are deprecated and have
  468. been removed from the ``digital_ocean`` driver. Use the ``post_dns_record`` function
  469. instead.
  470. Execution Module Deprecations
  471. -----------------------------
  472. - The ``blockdev`` execution module had four functions removed:
  473. - dump
  474. - tune
  475. - resize2fs
  476. - wipe
  477. The ``disk`` module should be used instead with the same function names.
  478. - The ``boto_vpc`` execution module had two functions removed,
  479. ``boto_vpc.associate_new_dhcp_options_to_vpc`` and
  480. ``boto_vpc.associate_new_network_acl_to_subnet`` in favor of more concise function
  481. names, ``boto_vpc.create_dhcp_options`` and ``boto_vpc.create_network_acl``, respectively.
  482. - The ``data`` execution module had ``getval`` and ``getvals`` functions removed
  483. in favor of one function, ``get``, which combines the functionality of the
  484. removed functions.
  485. - File module deprecations:
  486. - The ``contains_regex_multiline`` function was removed. Use ``file.search`` instead.
  487. - Additional command line options for ``file.grep`` should be passed one at a time.
  488. Please do not pass more than one in a single argument.
  489. - The ``lxc`` execution module has the following changes:
  490. - The ``run_cmd`` function was removed. Use ``lxc.run`` instead.
  491. - The ``nic`` argument was removed from the ``lxc.init`` function. Use ``network_profile``
  492. instead.
  493. - The ``clone`` argument was removed from the ``lxc.init`` function. Use ``clone_from``
  494. instead.
  495. - passwords passed to the ``lxc.init`` function will be assumed to be hashed, unless
  496. ``password_encrypted=False``.
  497. - The ``restart`` argument for ``lxc.start`` was removed. Use ``lxc.restart`` instead.
  498. - The old style of defining lxc containers has been removed. Please use keys under which
  499. LXC profiles should be configured such as ``lxc.container_profile.profile_name``.
  500. - The ``env`` and ``activate`` keyword arguments have been removed from the ``install``
  501. function in the ``pip`` execution module. The use of ``bin_env`` replaces both of these
  502. options.
  503. - ``reg`` execution module
  504. Functions in the ``reg`` execution module had misleading and confusing names
  505. for dealing with the Windows registry. They failed to clearly differentiate
  506. between hives, keys, and name/value pairs. Keys were treated like value names.
  507. There was no way to delete a key.
  508. New functions were added in 2015.5 to properly work with the registry. They
  509. also made it possible to edit key default values as well as delete an entire
  510. key tree recursively. With the new functions in place, the following functions
  511. have been deprecated:
  512. - read_key
  513. - set_key
  514. - create_key
  515. - delete_key
  516. Use the following functions instead:
  517. - for ``read_key`` use ``read_value``
  518. - for ``set_key`` use ``set_value``
  519. - for ``create_key`` use ``set_value`` with no ``vname`` and no ``vdata``
  520. - for ``delete_key`` use ``delete_key_recursive``. To delete a value, use
  521. ``delete_value``.
  522. - The ``hash_hostname`` option was removed from the ``salt.modules.ssh`` execution
  523. module. The ``hash_known_hosts`` option should be used instead.
  524. - The ``human_readable`` option was removed from the ``uptime`` function in the
  525. ``status`` execution module. The function was also updated in 2015.8.9 to return
  526. a more complete offering of uptime information, formatted as an easy-to-read
  527. dictionary. This updated function replaces the need for the ``human_readable``
  528. option.
  529. - The ``persist`` kwarg was removed from the ``win_useradd`` execution module. This
  530. option is no longer supported for Windows. ``persist`` is only supported as part
  531. of user management in UNIX/Linux.
  532. - The ``zpool_list`` function in the ``zpool`` execution module was removed. Use ``list``
  533. instead.
  534. Outputter Module Deprecations
  535. -----------------------------
  536. - The ``compact`` outputter has been removed. Set ``state_verbose`` to ``False`` instead.
  537. Runner Module Deprecations
  538. --------------------------
  539. - The ``grains.cache`` runner no longer accepts ``outputter`` or ``minion`` as keyword arguments.
  540. Users will need to specify an outputter using the ``--out`` option. ``tgt`` is
  541. replacing the ``minion`` kwarg.
  542. - The ``fileserver`` runner no longer accepts the ``outputter`` keyword argument. Users will
  543. need to specify an outputter using the ``--out`` option.
  544. - The ``jobs`` runner no longer accepts the ``outputter`` keyword argument. Users will need to
  545. specify an outputter using the ``--out`` option.
  546. - ``virt`` runner module:
  547. - The ``hyper`` kwarg was removed from the ``init``, ``list``, and ``query`` functions.
  548. Use the ``host`` option instead.
  549. - The ``next_hyper`` function was removed. Use the ``next_host`` function instead.
  550. - The ``hyper_info`` function was removed. Use the ``host_info`` function instead.
  551. State Module Deprecations
  552. -------------------------
  553. - The ``env`` and ``activate`` keyword arguments were removed from the ``installed``
  554. function in the ``pip`` state module. The use of ``bin_env`` replaces both of these
  555. options.
  556. - ``reg`` state module
  557. The ``reg`` state module was modified to work with the new functions in the
  558. execution module. Some logic was left in the ``reg.present`` and the
  559. ``reg.absent`` functions to handle existing state files that used the final
  560. key in the name as the value name. That logic has been removed so you now must
  561. specify value name (``vname``) and, if needed, value data (``vdata``).
  562. For example, a state file that adds the version value/data pair to the
  563. Software\\Salt key in the HKEY_LOCAL_MACHINE hive used to look like this:
  564. .. code-block:: yaml
  565. HKEY_LOCAL_MACHINE\\Software\\Salt\\version:
  566. reg.present:
  567. - value: 2016.3.1
  568. Now it should look like this:
  569. .. code-block:: yaml
  570. HKEY_LOCAL_MACHINE\\Software\\Salt
  571. reg.present:
  572. - vname: version
  573. - vdata: 2016.3.1
  574. A state file for removing the same value added above would have looked like
  575. this:
  576. .. code-block:: yaml
  577. HKEY_LOCAL_MACHINE\\Software\\Salt\\version:
  578. reg.absent:
  579. Now it should look like this:
  580. .. code-block:: yaml
  581. HKEY_LOCAL_MACHINE\\Software\\Salt
  582. reg.absent:
  583. - vname: version
  584. This new structure is important as it allows salt to deal with key default
  585. values which was not possible before. If vname is not passed, salt will work
  586. with the default value for that hive\key.
  587. Additionally, since you could only delete a value from a the state module, a
  588. new function (``key_absent``) has been added to allow you to delete a registry
  589. key and all subkeys and name/value pairs recursively. It uses the new
  590. ``delete_key_recursive`` function.
  591. For additional information see the documentation for the ``reg`` execution and
  592. state modules.
  593. - ``lxc`` state module: The following functions were removed from the ``lxc`` state
  594. module:
  595. - ``created``: replaced by the ``present`` state.
  596. - ``started``: replaced by the ``running`` state.
  597. - ``cloned``: replaced by the ``present`` state. Use the ``clone_from`` argument
  598. to set the name of the clone source.
  599. - The ``hash_hostname`` option was removed from the ``salt.states.ssh_known_hosts``
  600. state. The ``hash_known_hosts`` option should be used instead.
  601. - The ``always`` kwarg used in the ``built`` function of the ``pkgbuild`` state module
  602. was removed. Use ``force`` instead.
  603. Utils Module Deprecations
  604. -------------------------
  605. - The use of ``jid_dir`` and ``jid_load`` were removed from the
  606. ``salt.utils.jid``. ``jid_dir`` functionality for job_cache management was moved to
  607. the ``local_cache`` returner. ``jid_load`` data is now retrieved from the
  608. ``master_job_cache``.
  609. - ``ip_in_subnet`` function in ``salt.utils.network.py`` has been removed. Use the
  610. ``in_subnet`` function instead.
  611. - The ``iam`` utils module had two functions removed: ``salt.utils.iam.get_iam_region``
  612. and ``salt.utils.iam.get_iam_metadata`` in favor of the aws utils functions
  613. ``salt.utils.aws.get_region_from_metadata`` and ``salt.utils.aws.creds``, respectively.