Merge branch 'master' into win_task_repeat

This commit is contained in:
Charles McMarrow 2020-01-27 10:27:21 -08:00 committed by GitHub
commit 22a2d0b9ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 539 additions and 373 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
CHANGELOG.md merge=union
docs/topics/release/* merge=union

View file

@ -3,43 +3,243 @@ All notable changes to Salt will be documented in this file.
This changelog follows [keepachangelog](https://keepachangelog.com/en/1.0.0/) format, and is intended for human consumption.
This project versioning is *similar* to [Semantic Versioning](https://semver.org), and is documented in [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20/files).
This project versioning is _similar_ to [Semantic Versioning](https://semver.org), and is documented in [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20/files).
Versions are `MAJOR.PATCH`.
## Unreleased (Neon)
### Removed
- [#54943](https://github.com/saltstack/salt/pull/54943) - RAET transport method has been removed per the deprecation schedule - [@s0undt3ch](https://github.com/s0undt3ch)
- [#54474](https://github.com/saltstack/salt/issues/54474) via [#54475](https://github.com/saltstack/salt/pull/54475) - `virt.pool_delete` fast parameter removed. - [@cbosdo](https://github.com/cbosdo)
- [#54943](https://github.com/saltstack/salt/pull/54943) - Removed RAET transport method per the deprecation schedule - [@s0undt3ch](https://github.com/s0undt3ch)
- [#54983](https://github.com/saltstack/salt/pull/54983) - Removed Hipchat module, due to Hipchat discontinuation - [@mchugh19](https://github.com/mchugh19)
- [#55197](https://github.com/saltstack/salt/pull/55197) - Removed Google+ link since Google+ is gone - [@sramkrishna](https://github.com/sramkrishna)
- [#55539](https://github.com/saltstack/salt/pull/55539) - Removed salt.auth.Authorize class and the `any_auth` method
- [#55552](https://github.com/saltstack/salt/pull/55552) - Removed the config options `hgfs_env_whitelist`, `hgfs_env_blacklist`, `svnfs_env_whitelist`, and `svnfs_env_whitelist` in favor of `hgfs_saltenv_whitelist`, `hgfs_saltenv_blacklist`, `svnfs_saltenv_whitelist`, `svnfs_saltenv_blacklist`.
- [#55569](https://github.com/saltstack/salt/pull/55569) - Removed nova cloud driver in favor of the openstack driver.
- [#55573](https://github.com/saltstack/salt/pull/55573) - Removed `quiet` kwarg in cmd.run state module. Please set `output_loglevel` to `quiet` instead.
- [#55609](https://github.com/saltstack/salt/pull/55609) - Removed smartos grains `hypervisor_uuid` and `datacenter` in favor of `mdata:sdc:server_uuid` and `mdata:sdc:datacenter_name`.
- [#55641](https://github.com/saltstack/salt/pull/55641) - Removed `enviroment` kwarg from heat state and execution module. Please use correct spelling `environment`.
- [#55680](https://github.com/saltstack/salt/pull/55680) - Removed deprecated args from several `dockermod` functions - [@Ch3LL](https://github.com/Ch3LL)
- [#55682](https://github.com/saltstack/salt/pull/55682) - Removed `get_known_host` and `recv_known_host` functions from ssh module.
- [#55722](https://github.com/saltstack/salt/pull/55722) - Removed all functions in salt/utils/__init__.py.
- [#55725](https://github.com/saltstack/salt/pull/55725) - Removed `gitfs_env_whitelist` and `gitfs_env_blacklist` in favor of `gitfs_saltenv_whitelist` and `gitfs_saltenv_blacklist`.
### Deprecated
- [#55552](https://github.com/saltstack/salt/pull/55552) - The config options `hgfs_env_whitelist`, `hgfs_env_blacklist`, `svnfs_env_whitelist`, and `svnfs_env_whitelist` have been deprecated in favor of `hgfs_saltenv_whitelist`, `hgfs_saltenv_blacklist`, `svnfs_saltenv_whitelist`, `svnfs_saltenv_blacklist`.
- [#55569](https://github.com/saltstack/salt/pull/55569) - Deprecate nova cloud driver in favor of the openstack driver.
- [#55609](https://github.com/saltstack/salt/pull/55609) - Remove smartos grains `hypervisor_uuid` and `datacenter` in favor of `mdata:sdc:server_uuid` and `mdata:sdc:datacenter_name`.
- [#55539](https://github.com/saltstack/salt/pull/55539) - Deprecate salt.auth.Authorize class and the any_auth method
- [#55573](https://github.com/saltstack/salt/pull/55573) - Deprecate `quiet` kwarg in cmd.run state module. Please set `output_loglevel` to `quiet` instead.
- [#55641](https://github.com/saltstack/salt/pull/55641) - Deprecate `enviroment` kwarg from heat state and execution module. Please use correct spelling `environment`.
- [#55682](https://github.com/saltstack/salt/pull/55682) - Deprecate `get_known_host` and `recv_known_host` functions from ssh module.
- [#55683](https://github.com/saltstack/salt/pull/55683) - Deprecate `prune_services` in the firewall state module to be False by default. And update `force_masquerade` to be False by default in the firewall execution module.
- [#55722](https://github.com/saltstack/salt/pull/55722) - Deprecate all functions in salt/utils/__init__.py.
- [#55725](https://github.com/saltstack/salt/pull/55725) - Deprecate `gitfs_env_whitelist` and `gitfs_env_blacklist` in favor of `gitfs_saltenv_whitelist` and `gitfs_saltenv_blacklist`.
- [#55592](https://github.com/saltstack/salt/pull/55592) - Add deprecation warning for `glance` state and execution module - [@Ch3LL](https://github.com/Ch3LL)
- [#55612](https://github.com/saltstack/salt/pull/55612) - Bump keystone deprecation to Sodium - [@Ch3LL](https://github.com/Ch3LL)
- [#55614](https://github.com/saltstack/salt/pull/55614) - Deprecate jinja filters for Neon - [@Ch3LL](https://github.com/Ch3LL)
- [#55664](https://github.com/saltstack/salt/pull/55664) - Bump deprecation warning to Aluminium for neutron module - [@Ch3LL](https://github.com/Ch3LL)
- [#55679](https://github.com/saltstack/salt/pull/55679) - Deprecate `boto_vpc.describe_route_table` in Magnesium - [@Ch3LL](https://github.com/Ch3LL)
- [#55726](https://github.com/saltstack/salt/pull/55726) - Deprecate `override_name` in Sodium - [@Ch3LL](https://github.com/Ch3LL)
### Changed
- [#54013](https://github.com/saltstack/salt/pull/54103) - Set `session_id`
cookie in the rest_tornado backend.
- [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20) - Changed to numeric versions.
- [SEP 1](https://github.com/saltstack/salt-enhancement-proposals/blob/master/accepted/0001-changelog-format.md), [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20) - Adopted keepachangelog format.
- [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20) - Changed to numeric versions.
- [#49078](https://github.com/saltstack/salt/issues/49078) via [#54572](https://github.com/saltstack/salt/pull/54572) - Use `ip link set iface up/down` instead of `ifup/ifdown` - [@dmurphy18](https://github.com/dmurphy18)
- [#50023](https://github.com/saltstack/salt/pull/50023) via [#54620](https://github.com/saltstack/salt/pull/54620) - Change to reduce `roster_matcher` internal complexity - [@kojiromike](https://github.com/kojiromike)
- [#50579](https://github.com/saltstack/salt/pull/50579) via [#55389](https://github.com/saltstack/salt/pull/55389) - Update kafka returner to use confluent kafka - [@justindesilets](https://github.com/justindesilets)
- [#52749](https://github.com/saltstack/salt/pull/52749) - Padding change in versions report output - [@dwoz](https://github.com/dwoz)
- [#54013](https://github.com/saltstack/salt/pull/54103) - Set `session_id` cookie in the `rest_tornado` backend.
- [#55002](https://github.com/saltstack/salt/pull/55002) - Changed `mdadm_raid` metadata to text to allow float pillar data - [@aplanas](https://github.com/aplanas)
- [#55354](https://github.com/saltstack/salt/pull/55354) - Changed naive usage to use wrapped msgpack - [@Akm0d](https://github.com/Akm0d)
- [#55423](https://github.com/saltstack/salt/pull/55423) - Changed default configs to be immutable - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55464](https://github.com/saltstack/salt/pull/55464) - Changed to name subprocesses - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55500](https://github.com/saltstack/salt/pull/55500) - Start Linting Under Py3 - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55643](https://github.com/saltstack/salt/pull/55643) - Remove deprecation for `refresh_db` in aptpkg - [@Ch3LL](https://github.com/Ch3LL)
- [#55660](https://github.com/saltstack/salt/pull/55660) - Use wrapped json module for ThreadsafeProxy - [@Akm0d](https://github.com/Akm0d)
- [#55683](https://github.com/saltstack/salt/pull/55683) - Changed `prune_services` in the firewall state module to be False by default. And update `force_masquerade` to be False by default in the firewall execution module.
- [#55739](https://github.com/saltstack/salt/pull/55739) - Microoptimized the command to set FreeBSD's virtual grain - [@asomers](https://github.com/asomers)
### Fixed
- [#6922](https://github.com/saltstack/salt/pull/6922) via [#51343](https://github.com/saltstack/salt/pull/51343) - Fixed errors when producing network errors - [@waynew](https://github.com/waynew)
- [#13971](https://github.com/saltstack/salt/issues/13971) via [#53462](https://github.com/saltstack/salt/pull/53462) - Support all valid protos for remote sources - []
- [#37646](https://github.com/saltstack/salt/pull/37646) - Fixed recursion error during msgpack serialization - [@waynew](https://github.com/waynew)
- [#39875](https://github.com/saltstack/salt/pull/39875) via [#52710](https://github.com/saltstack/salt/pull/52710) and [#54665](https://github.com/saltstack/salt/pull/54665) - Fixed complex grain comparison - [@mickenordin](https://github.com/mickenordin)
- [#41818](https://github.com/saltstack/salt/pull/41818) via [#51988](https://github.com/saltstack/salt/pull/51988) and [#54664](https://github.com/saltstack/salt/pull/54664) - Fixed `file.comment` and `file.uncomment` for when the pattern existed in both forms - [@mbunkus](https://github.com/mbunkus)
- [#49222](https://github.com/saltstack/salt/pull/49222) via [#49223](https://github.com/saltstack/salt/pull/49223) and [#54668](https://github.com/saltstack/salt/pull/54668) - Fixed salt-key `token_file` creation when using external auth - [@msciciel](https://github.com/msciciel)
- [#49256](https://github.com/saltstack/salt/pull/49256) via [#55060](https://github.com/saltstack/salt/pull/55060) - Fixed proxmox failure to apply settings - [@BrianSidebotham](https://github.com/BrianSidebotham)
- [#49490](https://github.com/saltstack/salt/pull/49490) via [#55404](https://github.com/saltstack/salt/pull/55404) - Fixed misleading cmdmod error message - [@rares-pop](https://github.com/rares-pop) and [@joechainz](https://github.com/joechainz)
- [#49748](https://github.com/saltstack/salt/pull/49748) via [#49843](https://github.com/saltstack/salt/pull/49843) and [#54546](https://github.com/saltstack/salt/pull/54546) - Fixed `file.rename` to be successful when target exists and force not set - [@MTecknology](https://github.com/MTecknology)
- [#49903](https://github.com/saltstack/salt/pull/49903) via [#54625](https://github.com/saltstack/salt/pull/54625) - Fixed inconsistencies with `consul_pillar` configuration parsing - [@FraaJad](https://github.com/FraaJad)
- [#49977](https://github.com/saltstack/salt/pull/49977) via [#55050](https://github.com/saltstack/salt/pull/55050) - [#4997]Fix novaclient api - [@slivik](https://github.com/slivik)
- [#50041](https://github.com/saltstack/salt/pull/50041) via [#54566](https://github.com/saltstack/salt/pull/54566) - Actually use `extra_install_flags` in `win_pkg` module - [@cmcmarrow](https://github.com/cmcmarrow)
- [#50374](https://github.com/saltstack/salt/pull/50374) via [#54616](https://github.com/saltstack/salt/pull/54616) - Fixed `local_cache` returner to report proper path in error message - [@isbm](https://github.com/isbm)
- [#50523](https://github.com/saltstack/salt/pull/50523) via [#54605](https://github.com/saltstack/salt/pull/54605) - Fixed OS arch fallback when no `rpm` is installed - [@isbm](https://github.com/isbm)
- [#50757](https://github.com/saltstack/salt/pull/50757) via [#54638](https://github.com/saltstack/salt/pull/54638) - Fixed restartcheck bytestring bug - [@10ne1](https://github.com/10ne1)
- [#50938](https://github.com/saltstack/salt/pull/50938) via [#54642](https://github.com/saltstack/salt/pull/54642) - Fixed performance issue with undefined opkg functions - [@andzn](https://github.com/andzn)
- [#50970](https://github.com/saltstack/salt/pull/50970) via [#54631](https://github.com/saltstack/salt/pull/54631) - Fix `win_path` index checks to allow for 0 - [@jalandis](https://github.com/jalandis)
- [#51038](https://github.com/saltstack/salt/pull/51038) via [#55706](https://github.com/saltstack/salt/pull/55706) - Fixed zabbix module failure on boolean return - [@thechile](https://github.com/thechile)
- [#51537](https://github.com/saltstack/salt/pull/51537) via [#51538](https://github.com/saltstack/salt/pull/51538) and [#54650](https://github.com/saltstack/salt/pull/54650) - Fixed directory vs. file issue in `salt.utils.etcd_util` - [@arizvisa](https://github.com/arizvisa)
- [#51711](https://github.com/saltstack/salt/issues/52788) via [#51718](https://github.com/saltstack/salt/pull/51718) - Fix Cheetah template renderer - [@arizvisa](https://github.com/arizvisa)
- [#51785](https://github.com/saltstack/salt/pull/51785) via [#54645](https://github.com/saltstack/salt/pull/54645) - Fixed POSIX vs. Windows inconsistencies in `salt.utils.path.which` - [@arizvisa](https://github.com/arizvisa)
- [#51795](https://github.com/saltstack/salt/issues/51795) via [#51801](https://github.com/saltstack/salt/pull/51801) - Fix netbox execution module cannot be loaded - [@misch42](https://github.com/misch42)
- [#51811](https://github.com/saltstack/salt/pull/51811) via [#51813](https://github.com/saltstack/salt/pull/51813) and [#54647](https://github.com/saltstack/salt/pull/54647) - Fixed `npm` version check on Windows - [@arizvisa](https://github.com/arizvisa)
- [#51915](https://github.com/saltstack/salt/pull/51915) via [#54685](https://github.com/saltstack/salt/pull/54685) - Changed nulls to empty strings to prevent Zabbix API errors - [@timdufrane](https://github.com/timdufrane)
- [#51929](https://github.com/saltstack/salt/pull/51929) via [#54611](https://github.com/saltstack/salt/pull/54611) - Fixed lvm to not show errors when pv, lv, or vg is not expected - [@aplanas](https://github.com/aplanas)
- [#51954](https://github.com/saltstack/salt/pull/51954) via [#54603](https://github.com/saltstack/salt/pull/54603) - Ignore misleading errors during `linuxlvm.pvcreate` and `.pvremove` - [@aplanas](https://github.com/aplanas)
- [#52230](https://github.com/saltstack/salt/pull/52230) via [#52352](https://github.com/saltstack/salt/pull/52352) and [#54640](https://github.com/saltstack/salt/pull/54640) - Fixed salt failing on missing `_syspaths` variables - [@alan-cugler](https://github.com/alan-cugler)
- [#52265](http://www.github.com/saltstack/salt/issues/52265) via [#54569](https://github.com/saltstack/salt/pull/54569) - Stop the Windows installer from hanging - [@twangboy](https://github.com/twangboy)
- [#52431](https://github.com/saltstack/salt/pull/52431) via [#52574](https://github.com/saltstack/salt/pull/52574) and [#54687](https://github.com/saltstack/salt/pull/54687) - Fix inconsistent `virt.get_xml` usage - [@zer0def](https://github.com/zer0def)
- [#52538](https://github.com/saltstack/salt/pull/52538) via [#52747](https://github.com/saltstack/salt/pull/52747) and [#54678](https://github.com/saltstack/salt/pull/54678) - Fix issue on Python3 when reading csv pillar with binary format - [@que5o](https://github.com/que5o)
- [#52589](https://github.com/saltstack/salt/pull/52589) via [#54536](https://github.com/saltstack/salt/pull/54536) - Ignore retcode when checking filesystem type - [@terminalmage](https://github.com/terminalmage)
- [#52786](https://github.com/saltstack/salt/pull/52786) via [#54588](https://github.com/saltstack/salt/pull/54588) - Fixed setting homedrive, profile, logonscript, and description for `user.present` under Windows- [@twangboy](https://github.com/twangboy)
- [#52788](https://github.com/saltstack/salt/issues/52788) via [#51706](https://github.com/saltstack/salt/pull/51706) - Ignore `HOST_NOT_FOUND` and `NO_DATA` when resolving FQDN - [@aplanas](https://github.com/aplanas)
- [#53017](https://github.com/saltstack/salt/issues/53401) via [#54196](https://github.com/saltstack/salt/pull/54196) - Fixed virt state on stopped VMs, virt.running's use of virt.vm_state, virt.pool_running, and virt.network_define - [@cbosdo](https://github.com/cbosdo)
- [#53401](https://github.com/saltstack/salt/issues/53401) via [#54166](https://github.com/saltstack/salt/pull/54166) - Fixed Docker image grains and pillar - [@waynew](https://github.com/waynew)
- [#53600](https://github.com/saltstack/salt/issues/53600) via [#54480](https://github.com/saltstack/salt/pull/54480) - Allow Windows minion to manage a binary file from `ext_pillar` - [@xeacott](https://github.com/xeacott)
- [#53935](https://github.com/saltstack/salt/pull/53935) - Poweroff when shutting down FreeBSD, NetBSD, and OpenBSD - [@morganwillcock](https://github.com/morganwillcock)
- [#54072](https://github.com/saltstack/salt/pull/54072) - Check for Windows registry key before trying to list it - [@twangboy](https://github.com/twangboy)
- [#54177](https://github.com/saltstack/salt/issues/54177) - Fixed `file.managed` bug with `contents_newline` flag - [@xeacott](https://github.com/xeacott)
- [#54197](https://github.com/saltstack/salt/pull/54197) - `virt.network_define` can now create NAT networks - [@cbosdo](https://github.com/cbosdo)
- [#54216](https://github.com/saltstack/salt/pull/54216) - Fixed Homebrew cask namespace support - [@cdalvaro](https://github.com/cdalvaro)
- [#54335](https://github.com/saltstack/salt/pull/54335) - Fixed `virt.full_info` output - [@cbosdo](https://github.com/cbosdo)
- [#54402](https://github.com/saltstack/salt/pull/54402) via [#54900](https://github.com/saltstack/salt/pull/54900) - Fix gitfs to use bytes when using gitpython with python3.x - [@vin01](https://github.com/vin01)
- [#54411](https://github.com/saltstack/salt/pull/54411) - Correctly handle `wusa` 3010 return code - [@tlemarchand](https://github.com/tlemarchand)
- [#54653](https://github.com/saltstack/salt/pull/54653) via [#55403](https://github.com/saltstack/salt/pull/55403) - Fixed issue with `publish.publish` trim mods after comma split - [@bmiguel-teixeira](https://github.com/bmiguel-teixeira) and [@saltybaker](https://github.com/saltybaker)
- [#54769](https://github.com/saltstack/salt/pull/54769) - Fixed `cmd.run` to call bash only when necessary on macOS - [@cdalvaro](https://github.com/cdalvaro)
- [#54896](https://github.com/saltstack/salt/pull/54896) - Fix multiple LGPO issues - [@twangboy](https://github.com/twangboy)
- [#55003](https://github.com/saltstack/salt/pull/55003) - Fix `collections` ABC warning - [@aplanas](https://github.com/aplanas)
- [#55005](https://github.com/saltstack/salt/pull/55005) - Fixed `mount.remount` when fstype was unset - [@aplanas](https://github.com/aplanas)
- [#55006](https://github.com/saltstack/salt/pull/55006) - Fixed args/kwargs bug in loop state - [@aplanas](https://github.com/aplanas)
- [#55052](https://github.com/saltstack/salt/pull/55052) - Fixed fileclient for ftp connections - [@garethgreenaway](https://github.com/garethgreenaway)
- [#55065](https://github.com/saltstack/salt/pull/55065) - Fixed multiprocessing process after fork and finalize regression - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55083](https://github.com/saltstack/salt/pull/55083) - Fixed iLo module to use proper tempfile settings - [@garethgreenaway](https://github.com/garethgreenaway)
- [#55137](https://github.com/saltstack/salt/pull/55137) - Fixed `smartos_imgadm` to correctly handle orphan images - [@sjorge](https://github.com/sjorge)
- [#55149](https://github.com/saltstack/salt/pull/55149) via [#55497](https://github.com/saltstack/salt/pull/55497) - Removed incorrect pass of opts to `compound_match.match` - [@Akm0d](https://github.com/Akm0d)
- [#55165](https://github.com/saltstack/salt/pull/55165) - Fixed `virt.volume_infos` to handle volumes missing since last refresh - [@cbosdo](https://github.com/cbosdo)
- [#55190](https://github.com/saltstack/salt/pull/55190) - Fixed missing lazyloader functionality - [@max-arnold](https://github.com/max-arnold) and [@mattp-](https://github.com/mattp-)
- [#55191](https://github.com/saltstack/salt/pull/55191) - Fixed missing `list_downloaded` for apt module - [@brejoc](https://github.com/brejoc)
- [#55196](https://github.com/saltstack/salt/pull/55196) - Fixed `schedule.modify` to use function from current job - [@garethgreenaway](https://github.com/garethgreenaway)
- [#55207](https://github.com/saltstack/salt/pull/55207) - Fixed complex CORS option on CherryPy - [@niflostancu](https://github.com/niflostancu)
- [#55216](https://github.com/saltstack/salt/pull/55216) - Fixed failure to check for jid before returning data - [@brejoc](https://github.com/brejoc)
- [#55258](https://github.com/saltstack/salt/pull/55258) - Fixed aptpkg.info to return only installed packages - [@mateiw](https://github.com/mateiw)
- [#55271](https://github.com/saltstack/salt/pull/55271) - Fixed Py3 compatability issue in upstart - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55336](https://github.com/saltstack/salt/pull/55336) - Fixed grains to allow `__utils__` in grains modules - [@max-arnold](https://github.com/max-arnold)
- [#55351](https://github.com/saltstack/salt/pull/55351) - Fixed `virt.get_hypervisor()` - [@cbosdo](https://github.com/cbosdo)
- [#55374](https://github.com/saltstack/salt/pull/55374) - Fixed issue with `zfs.filesystem_present` under Python3 - [@silenius](https://github.com/silenius)
- [#55434](https://github.com/saltstack/salt/pull/55434) - Stopped removing a directory level from slspath in templates - [@terminalmage](https://github.com/terminalmage)
- [#55441](https://github.com/saltstack/salt/pull/55441) - Fixed bug in logging - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55452](https://github.com/saltstack/salt/pull/55452) - Fixed missing service.reload alias in `gentoo_service` module - [@vulnbe](https://github.com/vulnbe)
- [#55472](https://github.com/saltstack/salt/pull/55472) - Fixed several Py2/Py3 Unicode issues - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55501](https://github.com/saltstack/salt/pull/55501) - Fixed slowdown by using ss filter to match TCP connections on Linux - [@cifvts](https://github.com/cifvts)
- [#55510](https://github.com/saltstack/salt/pull/55510) - Corrected `num_cpus` and `cpu_model` grains for IBM/S390 - [@FerrySchuller](https://github.com/FerrySchuller)
- [#55532](https://github.com/saltstack/salt/pull/55532) - Fixed missing beacons timeout error handling - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55534](https://github.com/saltstack/salt/pull/55534) - Stopped `_virtual` from hard coding the 'virtual' key. - [@cmcmarrow](https://github.com/cmcmarrow)
- [#55540](https://github.com/saltstack/salt/pull/55540) - Fixed race condition in service.running on systemd - [@terminalmage](https://github.com/terminalmage)
- [#55557](https://github.com/saltstack/salt/pull/55557) - Changed to use UTC times for jids - [@dwoz](https://github.com/dwoz)
- [#55578](https://github.com/saltstack/salt/pull/55578) - Fixed `postgres.datadir_init` to use `checksums` arg - [@meaksh](https://github.com/meaksh)
- [#55580](https://github.com/saltstack/salt/pull/55580) - Fixed inconsistency with `pkg.list_pkgs` when using `attr` on RHEL systems - [@meaksh](https://github.com/meaksh)
- [#55582](https://github.com/saltstack/salt/pull/55582) - Do not report patches as installed when not all the related pkgs are installed (yumpkg) - [@meaksh](https://github.com/meaksh)
- [#55583](https://github.com/saltstack/salt/pull/55583) - Fixed `utils.network` issue with IPv6 that could cause a crash - [@meaksh](https://github.com/meaksh)
- [#55584](https://github.com/saltstack/salt/pull/55584) - Stopped breaking multiline repo files in `yumpkg` - [@meaksh](https://github.com/meaksh)
- [#55589](https://github.com/saltstack/salt/pull/55589) - Acme state fixes - [@github-abcde](https://github.com/github-abcde)
- [#55607](https://github.com/saltstack/salt/pull/55607) - Fixed failure to fire events to all syndics from MoM when using tcp transport - [@lukasraska](https://github.com/lukasraska)
- [#55616](https://github.com/saltstack/salt/pull/55616) - Fixed jboss `run_operation` and `datasource_exists` - [@cmcmarrow](https://github.com/cmcmarrow)
- [#55624](https://github.com/saltstack/salt/pull/55624) - Fixed issue with matchers, fallback to `ext_pillar` if there is no pillar in __opts__ - [@vquiering](https://github.com/vquiering)
- [#55635](https://github.com/saltstack/salt/pull/55635) - Fixed issue with minion signing during/after job execution - [@lukasraska](https://github.com/lukasraska)
- [#55651](https://github.com/saltstack/salt/pull/55651) - Fixed `ldap.managed` errors - [@sathieu](https://github.com/sathieu)
- [#55655](https://github.com/saltstack/salt/pull/55655) - Fixed using password hashes with MariaDB - [@pprkut](https://github.com/pprkut)
- [#55672](https://github.com/saltstack/salt/pull/55672) - Fixed issue with busy guestfs mount folders - [@cbosdo](https://github.com/cbosdo)
- [#55694](https://github.com/saltstack/salt/pull/55694) - Fixed S3 pillar pagination - [@garethgreenaway](https://github.com/garethgreenaway)
- [#55705](https://github.com/saltstack/salt/pull/55705) - Fixed zypper upgrade fromrepo - [@pkwestm](https://github.com/pkwestm)
- [#55730](https://github.com/saltstack/salt/pull/55730) - Restored original minion configured `publish_port` behavior - [@mattp-](https://github.com/mattp-) and [@Ch3LL](https://github.com/Ch3LL)
- [#55780](https://github.com/saltstack/salt/pull/55780) - Fallback to disabled `LG_INCLUDE_INDIRECT` when DC is unavailable - [@lukasraska](https://github.com/lukasraska)
- [#55795](https://github.com/saltstack/salt/pull/55795) - Fixed issue with whitespace in ADML data - [@twangboy](https://github.com/twangboy)
- [#55796](https://github.com/saltstack/salt/pull/55796) - Fixed cached `osrelease_info` grain type - [@srg91](https://github.com/srg91)
- [#55843](https://github.com/saltstack/salt/pull/55843) - Fixed `file.mkdir` to respect `test=True` - [@mchugh19](https://github.com/mchugh19)
- [#55845](https://github.com/saltstack/salt/pull/55845) - Fixed logging to return multiprocessing queue if it's already set - [@s0undt3ch](https://github.com/s0undt3ch)
### Added
- [#54505](https://github.com/saltstack/salt/issues/54505) - Added cluster get_settings, put_settings and flush_synced methods for Elasticsearch module. - [@Oloremo](https://github.com/Oloremo)
- [#16674](https://github.com/saltstack/salt/pull/16674) via [#50083](https://github.com/saltstack/salt/pull/50083) and [#54632](https://github.com/saltstack/salt/pull/54632) - Added `migrate` support for Django module - [@jrbeilke](https://github.com/jrbeilke)
- [#39475](https://github.com/saltstack/salt/issues/39475) - Added `hardlink` for `file` state and module - [@arizvisa](https://github.com/arizvisa)
- [#48792](https://github.com/saltstack/salt/pull/48792) via [#49399](https://github.com/saltstack/salt/pull/49399) and [#54879](https://github.com/saltstack/salt/pull/54879) - Add IIS webconfiguration - [@tlemarchand](https://github.com/tlemarchand)
- [#49212](https://github.com/saltstack/salt/pull/49212) via [#49378](https://github.com/saltstack/salt/pull/49378) - Added `minion_id_remove_domain`- [@markuskramerIgitt](https://github.com/markuskramerIgitt)
- [#49250](https://github.com/saltstack/salt/pull/49250) via [#54657](https://github.com/saltstack/salt/pull/54657) - Add capability `jboss7` to keep unchanged deployments - [@garethgreenaway](https://github.com/garethgreenaway)
- [#49481](https://github.com/saltstack/salt/pull/49481) via [#54532](https://github.com/saltstack/salt/pull/54532) - Added `grains_blacklist` to block specific grains - [@rongzeng54](https://github.com/rongzeng54)
- [#50005](https://github.com/saltstack/salt/pull/50005) via [#54651](https://github.com/saltstack/salt/pull/54651) - Added ability to create events based on an arbitrary script's output - [@austinpapp](https://github.com/austinpapp)
- [#50306](https://github.com/saltstack/salt/pull/50306) via [#54542](https://github.com/saltstack/salt/pull/54542) - Added `noaction` flag for opkg execution module - [@rares-pop](https://github.com/rares-pop)
- [#50706](https://github.com/saltstack/salt/pull/50706) via [#54604](https://github.com/saltstack/salt/pull/54604) - Added `token` to `disk.blkid` to allow extended search - [@aplanas](https://github.com/aplanas)
- [#50953](https://github.com/saltstack/salt/pull/50953) via [#54548](https://github.com/saltstack/salt/pull/54548) - Add `nvme_nqn` grain - [@sdodsley](https://github.com/sdodsley)
- [#51047](https://github.com/saltstack/salt/pull/51047) via [#55253](https://github.com/saltstack/salt/pull/55253) - Added new execution module for troubleshooting Jinja map files- [@terminalmage](https://github.com/terminalmage) and [@max-arnold](https://github.com/max-arnold)
- [#51074](https://github.com/saltstack/salt/pull/51074) via [#54613](https://github.com/saltstack/salt/pull/54613) - Added `fat` parameter to disk module to allow specifying FAT sizes - [@aplanas](https://github.com/aplanas)
- [#51385](https://github.com/saltstack/salt/pull/51385) via [#54656](https://github.com/saltstack/salt/pull/54656) - Added support for directories and checking for free space in the `disk` state - [@maxim-sermin](https://github.com/maxim-sermin)
- [#51758](https://github.com/saltstack/salt/pull/51758) via [#55400](https://github.com/saltstack/salt/pull/55400) - Added cwd grain - [@theskabeater](https://github.com/theskabeater) and [@dwoz](https://github.com/dwoz)
- [#52293](https://github.com/saltstack/salt/pull/52293) via [#55723](https://github.com/saltstack/salt/pull/55723) - Added saltenv support in slsutil.renderer - [@afischer-opentext-com](https://github.com/afischer-opentext-com)
- [#52458](https://github.com/saltstack/salt/pull/52458) via [#54623](https://github.com/saltstack/salt/pull/54623) - Added `camel_to_snake_case` and `snake_to_camel_case` to stringutils - [@github-abcde](https://github.com/github-abcde)
- [#52715](https://github.com/saltstack/salt/pull/52715) via [#54577](https://github.com/saltstack/salt/pull/54577) - Added webhook support to Slack state - [@garethgreenaway](https://github.com/garethgreenaway)
- [#52764](https://github.com/saltstack/salt/pull/52764) via [#54058](https://github.com/saltstack/salt/pull/54058) - Added vSphere tagging ability - [@xeacott](https://github.com/xeacott)
- [#53307](https://github.com/saltstack/salt/pull/53307) - Added slot parsing inside nested state data structures - [@max-arnold](https://github.com/max-arnold)
- [#53621](https://github.com/saltstack/salt/pull/53621) - Added support for `git_pillar_update_interval` - [@sathieu](https://github.com/sathieu)
- [#53736](https://github.com/saltstack/salt/issues/53736) - Added index get_settings, put_settings methods for Elasticsearch module. - [@Oloremo](https://github.com/Oloremo)
- [#53738](https://github.com/saltstack/salt/pull/53738) - Added `request_interval` feature to `http.wait_for_successful_query` module - [@Oloremo](https://github.com/Oloremo)
- [#53959](https://github.com/saltstack/salt/pull/53959) - Added additional optional `warnings` to `test` module - [@max-arnold](https://github.com/max-arnold)
- [#54505](https://github.com/saltstack/salt/issues/54505) - Added cluster get_settings, put_settings and flush_synced methods for Elasticsearch module. - [@Oloremo](https://github.com/Oloremo)
- [#54518](https://github.com/saltstack/salt/pull/54518) via [#54526](https://github.com/saltstack/salt/pull/54526) - Add salt-cloud support for Tencent Cloud - [@likexian](https://github.com/likexian)
- [#54902](https://github.com/saltstack/salt/pull/54902) - Added `cert_info` beacon to get cert information from local files - [@nicholasmhughes](https://github.com/nicholasmhughes)
- [#54903](https://github.com/saltstack/salt/pull/54903) - Added multipart/form-data file posting to `http.query` util - [@nicholasmhughes](https://github.com/nicholasmhughes)
- [#54948](https://github.com/saltstack/salt/pull/54948) - Added ability to pass grains on minion startup event - [@admd](https://github.com/admd)
- [#54955](https://github.com/saltstack/salt/pull/54955) - Added root parameter to useradd, shadow and groupadd - [@aplanas](https://github.com/aplanas)
- [#54956](https://github.com/saltstack/salt/pull/54956) - Added root parameter for wait and run states - [@aplanas](https://github.com/aplanas)
- [#54958](https://github.com/saltstack/salt/pull/54958) - Added optional root parameter for systemd - [@aplanas](https://github.com/aplanas)
- [#54959](https://github.com/saltstack/salt/pull/54959) - Added new chroot module - [@aplanas](https://github.com/aplanas)
- [#54960](https://github.com/saltstack/salt/pull/54960) - Added new freezer module - [@aplanas](https://github.com/aplanas)
- [#54961](https://github.com/saltstack/salt/pull/54961) - Added all subvolume commands to btrfs - [@aplanas](https://github.com/aplanas)
- [#54965](https://github.com/saltstack/salt/pull/54965) - Added fstab present/absent to mount state - [@aplanas](https://github.com/aplanas)
- [#54977](https://github.com/saltstack/salt/pull/54977) - Added xml state & module - [@mchugh19](https://github.com/mchugh19)
- [#54981](https://github.com/saltstack/salt/pull/54981) - Added `ssh_auth.manage` to both add _and_ remove ssh keys - [@mchugh19](https://github.com/mchugh19)
- [#54982](https://github.com/saltstack/salt/pull/54982) - Added new AWS SSM module - [@mchugh19](https://github.com/mchugh19)
- [#54984](https://github.com/saltstack/salt/pull/54984) - Added saltutil states to match saltutil modules - [@mchugh19](https://github.com/mchugh19) and [@max-arnold](https://github.com/max-arnold)
- [#54991](https://github.com/saltstack/salt/pull/54991) - Added keystore state and modules for Java keystore files - [@mchugh19](https://github.com/mchugh19)
- [#54992](https://github.com/saltstack/salt/pull/54992) - Added ability to use salt modules in onlyif and unless - [@mchugh19](https://github.com/mchugh19) and [@gtmanfred](https://github.com/gtmanfred)
- [#54993](https://github.com/saltstack/salt/pull/54993) - Added support for parsing slot results - [@mchugh19](https://github.com/mchugh19)
- [#54996](https://github.com/saltstack/salt/pull/54996) - Added `binds` parameter for `run_chroot` - [@aplanas](https://github.com/aplanas)
- [#55001](https://github.com/saltstack/salt/pull/55001) - Added ability to ignore errors on `mdadm_raid.examine` - [@aplanas](https://github.com/aplanas)
- [#55047](https://github.com/saltstack/salt/pull/55047) - Added ability to deprecate by date - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55145](https://github.com/saltstack/salt/pull/55145) and [#50150](https://github.com/saltstack/salt/pull/50150) - Added status code lists and status regex for `http.query` state - [@Ajnbro](https://github.com/Ajnbro) and [@mchugh19](https://github.com/mchugh19)
- [#55150](https://github.com/saltstack/salt/pull/55150) - Added 'ppc64le' as a valid RPM package architecture - [@meaksh](https://github.com/meaksh)
- [#55195](https://github.com/saltstack/salt/pull/55195) - Added `salt_version` module - [@rallytime](https://github.com/rallytime) and [@max-arnold](https://github.com/max-arnold)
- [#55200](https://github.com/saltstack/salt/pull/55200) - Added `virt.pool_deleted` state - [@cbosdo](https://github.com/cbosdo)
- [#55202](https://github.com/saltstack/salt/pull/55202) - Added test ability and pool editing to `virt.pool_running` - [@cbosdo](https://github.com/cbosdo)
- [#55203](https://github.com/saltstack/salt/pull/55203) - Adds enabled kwarg to `aptpkg` module - [@brejoc](https://github.com/brejoc)
- [#55245](https://github.com/saltstack/salt/pull/55245) - Adding kernel boot parameters to libvirt xml - [@ldeweysuse](https://github.com/ldeweysuse)
- [#55256](https://github.com/saltstack/salt/pull/55256) - Added status to dpkg.info response - [@mateiw](https://github.com/mateiw)
- [#55342](https://github.com/saltstack/salt/pull/55342) - Added Slack webhook returner - [@cdalvaro](https://github.com/cdalvaro)
- [#55345](https://github.com/saltstack/salt/pull/55345) - Add chroot apply_, sls, and highstate for state execution - [@aplanas](https://github.com/aplanas)
- [#55346](https://github.com/saltstack/salt/pull/55346) - Added `virt.pool_capabilities` module - [@cbosdo](https://github.com/cbosdo)
- [#55418](https://github.com/saltstack/salt/pull/55418) - Added clean_parent argument for the archive state. - [@Oloremo](https://github.com/Oloremo)
- [#55593](https://github.com/saltstack/salt/issues/55593) - Added a support for a global proxy to pip module. - [@Oloremo](https://github.com/Oloremo)
- [#55420](https://github.com/saltstack/salt/pull/55420) - Added performance tracing/logging to gitfs file_list cache rebuild - [@duckfez](https://github.com/duckfez)
- [#55424](https://github.com/saltstack/salt/pull/55424) - Added Azure DNS modules and states - [@nicholasmhughes](https://github.com/nicholasmhughes)
- [#55432](https://github.com/saltstack/salt/pull/55432) - Add null to YAML dumper for threadsafe loader - [@Akm0d](https://github.com/Akm0d)
- [#55443](https://github.com/saltstack/salt/issues/55443) - Added a skip_files_list_verify argument to archive.extracted state. - [@Oloremo](https://github.com/Oloremo)
- [#55448](https://github.com/saltstack/salt/pull/55448) - Adds `downloadonly/download_only` alias for aptpkg module - [@brejoc](https://github.com/brejoc)
- [#55480](https://github.com/saltstack/salt/pull/55480) - Add lint pre-commit hooks - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55492](https://github.com/saltstack/salt/pull/55492) - Allow arbitrary arguments to be passed through the pip module - [@Akm0d](https://github.com/Akm0d)
- [#55506](https://github.com/saltstack/salt/pull/55506) - Added `hashutil.hmac_compute` - [@Ajnbro](https://github.com/Ajnbro)
- [#55515](https://github.com/saltstack/salt/pull/55515) - Added `disk_set` and `disk_toggle` to parted module - [@aplanas](https://github.com/aplanas)
- [#55516](https://github.com/saltstack/salt/pull/55516) - Added `not_change` to several functions in the mount module, `set_fstab` & others - [@aplanas](https://github.com/aplanas)
- [#55565](https://github.com/saltstack/salt/pull/55565) - Added ability to pass the context dictionary to Sminion and Runner - [@s0undt3ch](https://github.com/s0undt3ch)
- [#55590](https://github.com/saltstack/salt/pull/55590) - Added `version` to depends decorator - [@github-abcde](https://github.com/github-abcde)
- [#55593](https://github.com/saltstack/salt/issues/55593) - Added a support for a global proxy to pip module. - [@Oloremo](https://github.com/Oloremo)
- [#55613](https://github.com/saltstack/salt/pull/55613) - Added saltcheck updates for Neon - [@mchugh19](https://github.com/mchugh19)
- [#55636](https://github.com/saltstack/salt/pull/55636) - Added DSON outputter - [@terminalmage](https://github.com/terminalmage)
- [#55637](https://github.com/saltstack/salt/pull/55637) - Added wildcard matches and grains matching to `config.option` - [@terminalmage](https://github.com/terminalmage)
- [#55639](https://github.com/saltstack/salt/pull/55639) - Added `loop.until_no_eval` - [@github-abcde](https://github.com/github-abcde)
- [#55666](https://github.com/saltstack/salt/pull/55666) - Added the `internal` flag to openvswitch - [@Akm0d](https://github.com/Akm0d)
- [#55711](https://github.com/saltstack/salt/pull/55711) - Added `fluentd` engine - [@mchugh19](https://github.com/mchugh19)
- [#55733](https://github.com/saltstack/salt/pull/55733) - Added `salt.utils.data.filter_falsey` - [@github-abcde](https://github.com/github-abcde)
- [#55749](https://github.com/saltstack/salt/pull/55749) - Added port of `json_query` Jinja filter from Ansible - [@max-arnold](https://github.com/max-arnold)
- [#55751](https://github.com/saltstack/salt/pull/55751) - Added the osfullname grain on FreeBSD - [@asomers](https://github.com/asomers)
- [#55759](https://github.com/saltstack/salt/pull/55759) - Added `salt.utils.data.recursive_diff` - [@github-abcde](https://github.com/github-abcde)
- [#55760](https://github.com/saltstack/salt/pull/55760) - Add minion-side access control - [@github-abcde](https://github.com/github-abcde)
- [#55762](https://github.com/saltstack/salt/pull/55762) - Added `virt.(pool|network)_get_xml` functions - [@cbosdo](https://github.com/cbosdo)
- [#55767](https://github.com/saltstack/salt/pull/55767) - Added ability to manipulate RabbitMQ upstream definitions - [@github-abcde](https://github.com/github-abcde)
- [#55768](https://github.com/saltstack/salt/pull/55768) - Added `boto3_elasticsearch` module and state - [@github-abcde](https://github.com/github-abcde)
- [#55844](https://github.com/saltstack/salt/pull/55844) - Allow multiple running instances of Salt engine - [@garethgreenaway](https://github.com/garethgreenaway)
---

View file

@ -1,4 +1,3 @@
:orphan:
.. _release-3000:
=======================================
@ -20,6 +19,17 @@ compare Salt's versions, please use LooseVersion. There is also the packaging
library you can use to compare versions. Another alternative is using the
:py:func:`salt version module<salt.modules.salt_version>`
Vendored Tornado Code Base
==========================
The Tornado code base has been included as ``salt.ext.tornado``. This was done
to provide a consistent version of Tornado across all operating systems while
we continue to work on upgrading Tornado to a recent version. New code that
uses Tornado should import the module from ``salt.ext.tornado`` instead of
importing the system version of Tornado.
Saltcheck Updates
=================
@ -193,16 +203,41 @@ The dictionary must contain an argument ``fun`` which is the module that is
being run, and everything else must be passed in under the args key or will be
passed as individual kwargs to the module function.
.. note::
Certain states have an ``unless``/``onlyif`` implementation that predates this feature, and may not work as expected:
* states.git
* states.cmd
* states.macpackage
* states.file
* states.docker_container
Examples:
.. code-block:: yaml
install apache on debian based distros:
cmd.run:
- name: make install
- cwd: /path/to/dir/whatever-2.1.5/
- unless:
check external ip address:
http.query:
- name: https://icanhazip.com
- status: 200
- onlyif:
- fun: file.file_exists
path: /usr/local/bin/whatever
is equivalent to
.. code-block:: yaml
check another ip address:
http.query:
- name: https://icanhazip.com
- status: 200
- onlyif:
- test -f /tmp/fnord.txt
Another example:
.. code-block:: yaml
set mysql root password:
@ -385,15 +420,15 @@ Also, slot parsing is now supported inside of nested state data structures (dict
- "DO NOT OVERRIDE"
ignore_if_missing: True
State Changes
=============
- The :py:func:`file.symlink <salt.states.file.symlink>` state was
fixed to remove existing file system entries other than files,
directories and symbolic links properly.
- The ``onchanges`` and ``prereq`` :ref:`requisites <requisites>` now behave
properly in test mode.
State Changes
=============
properly in test mode, due to removing ``pchanges``.
- Added new :py:func:`ssh_auth.manage <salt.states.ssh_auth.manage>` state to
ensure only the specified ssh keys are present for the specified user.
@ -401,43 +436,17 @@ State Changes
- Added new :py:func:`saltutil <salt.states.saltutil>` state to use instead of
``module.run`` to more easily handle change.
- Added new `onfail_all` requisite form to allow for AND logic when adding
onfail states.
Module Changes
==============
- The :py:func:`debian_ip <salt.modules.debian_ip>` module used by the
:py:func:`network.managed <salt.states.network.managed>` state has been
heavily refactored. The order that options appear in inet/inet6 blocks may
produce cosmetic changes. Many options without an 'ipvX' prefix will now be
shared between inet and inet6 blocks. The options ``enable_ipv4`` and
``enabled_ipv6`` will now fully remove relevant inet/inet6 blocks. Overriding
options by prefixing them with 'ipvX' will now work with most options (i.e.
``dns`` can be overriden by ``ipv4dns`` or ``ipv6dns``). The ``proto`` option
is now required.
- Added new :py:func:`boto_ssm <salt.modules.boto_ssm>` module to set and query
secrets in AWS SSM parameters.
- Added new :py:func:`flatpak <salt.modules.flatpak>` module to work with flatpak packages.
- The :py:func:`file.set_selinux_context <salt.modules.file.set_selinux_context>`
module now supports perstant changes with ``persist=True`` by calling the
:py:func:`selinux.fcontext_add_policy <salt.modules.selinux.fcontext_add_policy>` module.
- The :py:func:`file.remove <salt.modules.file.remove>` module was
fixed to remove file system entries other than files, directories
and symbolic links properly.
- The :py:func:`yumpkg <salt.modules.yumpkg>` module has been updated to support
VMWare's Photon OS, which uses tdnf (a C implementation of dnf).
- The :py:func:`chocolatey.bootstrap <salt.modules.chocolatey.bootstrap>` function
has been updated to support offline installation.
- The :py:func:`chocolatey.unbootstrap <salt.modules.chocolatey.unbootstrap>` function
has been added to uninstall Chocolatey.
Enhancements to Engines
=======================
@ -459,50 +468,6 @@ the ``engine_module`` parameter in the engine configuration.
proto: tcp
engine_module: logstash
Runner Changes
==============
- The :py:func:`saltutil.sync_auth <salt.runners.saltutil.sync_auth>` function
has been added to sync loadable auth modules. :py:func:`saltutil.sync_all <salt.runners.saltutil.sync_all>`
will also include these modules.
Util Changes
============
- The :py:func:`win_dotnet <salt.utils.win_dotnet>` Salt util has been added to
make it easier to detect the versions of .NET installed on the system. It includes
the following functions:
- :py:func:`versions <salt.utils.win_dotnet.versions>`
- :py:func:`versions_list <salt.utils.win_dotnet.versions_list>`
- :py:func:`versions_details <salt.utils.win_dotnet.versions_details>`
- :py:func:`version_at_least <salt.utils.win_dotnet.version_at_least>`
Serializer Changes
==================
- The configparser serializer and deserializer functions can now be made to preserve
case of item names by passing 'preserve_case=True' in the options parameter of the function.
.. note::
This is a parameter consumed only by the salt.serializer.configparser serialize and
deserialize functions and not the low-level configparser python object.
For example, in a file.serialze state:
.. code-block:: yaml
some.ini:
- file.serialize:
- formatter: configparser
- merge_if_exists: True
- deserializer_opts:
- preserve_case: True
- serializer_opts:
- preserve_case: True
Enhancements to Engines
=======================
- A new :py:func:`fluent engine <salt.engines.salt.engines.fluent>` has been
added to export Salt events to fluentd.
@ -543,11 +508,13 @@ the ``beacon_module`` parameter in the beacon configuration.
/etc/another_file: {}
- beacon_module: inotify
Module Changes
==============
Enhancements to chroot
======================
- Added new :py:func:`boto_ssm <salt.modules.boto_ssm>` module to set and query
secrets in AWS SSM parameters.
- New functions added to chroot :py:func:`apply<salt.modules.chroot.apply_>`,
:py:func:`sls<salt.modules.chroot.sls>`, and
:py:func:`highstate<salt.modules.chroot.highstate>` that allow executing
states in sls files or running apply/highstate inside of a chroot.
Deprecations
============

View file

@ -31,5 +31,4 @@ setproctitle
singledispatch==3.4.0.3
smmap==0.9.0
timelib==0.2.4
tornado==4.5.3
vultr==1.0.1

View file

@ -36,6 +36,10 @@ setproctitle
singledispatch==3.4.0.3
smmap==0.9.0
timelib==0.2.4
tornado==4.5.3
watchdog==0.9.0
wheel==0.33.4
# Requirements for Tornado 4.5.3 (vendored as salt.ext.tornado)
backports-abc==0.5
singledispatch==3.4.0.3
# Required by Tornado to handle threads stuff.
futures>=2.0; python_version < '3.0'

View file

@ -5,8 +5,8 @@ msgpack>=0.5,!=0.5.5
PyYAML
MarkupSafe
requests>=1.0.0
tornado>=4.2.1,<6.0; python_version < '3'
tornado>=4.2.1,<5.0; python_version >= '3.4'
# Requirements for Tornado 4.5.3 (vendored as salt.ext.tornado)
backports-abc==0.5
singledispatch==3.4.0.3
# Required by Tornado to handle threads stuff.
futures>=2.0; python_version < '3.0'

View file

@ -40,7 +40,6 @@ setuptools-scm
strict_rfc3339
supervisor==3.3.5; python_version < '3'
timelib
tornado<5.0
virtualenv
watchdog
vcert~=0.7.0

View file

@ -123,7 +123,6 @@ strict-rfc3339==0.7
supervisor==3.3.5 ; python_version < "3"
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version < "3"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -10,7 +10,7 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5 # via tornado
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot, jaraco.functools
backports.ssl-match-hostname==3.7.0.1 # via docker, websocket-client
backports.tempfile==1.0 # via moto
@ -116,14 +116,13 @@ scp==0.13.2 # via junos-eznc
selectors2==2.0.1 # via ncclient
setproctitle==1.1.10
setuptools-scm==3.2.0
singledispatch==3.4.0.3 # via tornado
singledispatch==3.4.0.3
six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kazoo, kubernetes, mock, more-itertools, moto, ncclient, packaging, pathlib2, pygit2, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, vcert, websocket-client
smmap2==2.0.5 # via gitdb2
strict-rfc3339==0.7
supervisor==3.3.5 ; python_version < "3"
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version < "3"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -119,7 +119,6 @@ strict-rfc3339==0.7
supervisor==3.3.5 ; python_version < "3"
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version < "3"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
virtualenv==16.4.3
watchdog==0.9.0

View file

@ -10,7 +10,7 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5 # via tornado
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot
backports.ssl-match-hostname==3.7.0.1 # via docker, websocket-client
bcrypt==3.1.6 # via paramiko
@ -107,13 +107,12 @@ scp==0.13.2 # via junos-eznc
selectors2==2.0.1 # via ncclient
setproctitle==1.1.10
setuptools-scm==3.2.0
singledispatch==3.4.0.3 # via tornado
singledispatch==3.4.0.3
six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kazoo, kubernetes, mock, more-itertools, moto, ncclient, packaging, pathlib2, pygit2, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, vcert, websocket-client
smmap2==2.0.5 # via gitdb2
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -112,7 +112,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -10,7 +10,7 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5 # via tornado
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot
backports.ssl-match-hostname==3.7.0.1 # via websocket-client
bcrypt==3.1.6 # via paramiko
@ -105,13 +105,12 @@ salttesting==2017.6.1
scp==0.13.2 # via junos-eznc
setproctitle==1.1.10
setuptools-scm==3.2.0
singledispatch==3.4.0.3 # via tornado
singledispatch==3.4.0.3
six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kazoo, kubernetes, mock, more-itertools, moto, ncclient, packaging, pathlib2, pygit2, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, vcert, websocket-client
smmap2==2.0.5 # via gitdb2
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -109,7 +109,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
virtualenv==16.4.3
watchdog==0.9.0

View file

@ -10,9 +10,9 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot
backports.ssl_match_hostname==3.7.0.1
backports_abc==0.5
bcrypt==3.1.6 # via paramiko
boto3==1.9.132
boto==2.49.0
@ -111,7 +111,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -10,7 +10,7 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5 # via tornado
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot
backports.ssl-match-hostname==3.7.0.1 # via websocket-client
bcrypt==3.1.6 # via paramiko
@ -104,13 +104,12 @@ salttesting==2017.6.1
scp==0.13.2 # via junos-eznc
setproctitle==1.1.10
setuptools-scm==3.2.0
singledispatch==3.4.0.3 # via tornado
singledispatch==3.4.0.3
six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kazoo, kubernetes, mock, more-itertools, moto, ncclient, packaging, pygit2, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, vcert, websocket-client
smmap2==2.0.5 # via gitdb2
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -108,7 +108,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
virtualenv==16.4.3
watchdog==0.9.0

View file

@ -111,7 +111,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -10,9 +10,8 @@ asn1crypto==1.3.0 # via certvalidator, cryptography, oscrypto
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
aws-xray-sdk==0.95 # via moto
backports-abc==0.5 # via tornado
backports-abc==0.5
backports.functools-lru-cache==1.5 # via cheroot
backports.ssl-match-hostname==3.7.0.1 # via websocket-client
bcrypt==3.1.6 # via paramiko
boto3==1.9.132
boto==2.49.0
@ -104,13 +103,12 @@ salttesting==2017.6.1
scp==0.13.2 # via junos-eznc
setproctitle==1.1.10
setuptools-scm==3.2.0
singledispatch==3.4.0.3 # via tornado
singledispatch==3.4.0.3
six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kazoo, kubernetes, mock, more-itertools, moto, ncclient, packaging, pygit2, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, vcert, websocket-client
smmap2==2.0.5 # via gitdb2
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
vcert==0.7.3
virtualenv==16.4.3

View file

@ -108,7 +108,6 @@ smmap==0.9.0
strict-rfc3339==0.7
tempora==1.14.1 # via portend
timelib==0.2.4
tornado==4.5.3 ; python_version >= "3.4"
urllib3==1.24.2 # via botocore, kubernetes, python-etcd, requests
virtualenv==16.4.3
watchdog==0.9.0

View file

@ -31,7 +31,6 @@ strict_rfc3339
supervisor==3.3.5; python_version < '3'
virtualenv
timelib
tornado<5.0
wmi==1.4.9
# Available template libraries that can be used

View file

@ -215,7 +215,8 @@ class IPv6InterfaceScoped(ipaddress.IPv6Interface, IPv6AddressScoped):
Update
'''
def __init__(self, address):
if isinstance(address, (bytes, int)):
if PY3 and isinstance(address, (bytes, int)) or \
not PY3 and isinstance(address, int):
IPv6AddressScoped.__init__(self, address)
self.network = ipaddress.IPv6Network(self._ip)
self._prefixlen = self._max_prefixlen

View file

@ -23,7 +23,7 @@
#======================================================================================================================
set -o nounset # Treat unset variables as an error
__ScriptVersion="2019.11.04"
__ScriptVersion="2020.01.21"
__ScriptName="bootstrap-salt.sh"
__ScriptFullName="$0"
@ -270,6 +270,7 @@ _QUIET_GIT_INSTALLATION=$BS_FALSE
_REPO_URL="repo.saltstack.com"
_PY_EXE=""
_INSTALL_PY="$BS_FALSE"
_TORNADO_MAX_PY3_VERSION="5.0"
# Defaults for install arguments
ITYPE="stable"
@ -674,7 +675,7 @@ if [ -n "$_PY_EXE" ]; then
if [ "$(uname)" = "Darwin" ]; then
_PY_PKG_VER=$(echo "$_PY_EXE" | sed "s/\\.//g")
else
_PY_PKG_VER=$(echo "$_PY_EXE" | sed -r "s/\\.//g")
_PY_PKG_VER=$(echo "$_PY_EXE" | sed -E "s/\\.//g")
fi
_PY_MAJOR_VERSION=$(echo "$_PY_PKG_VER" | cut -c 7)
@ -933,11 +934,11 @@ __strip_duplicates() {
__sort_release_files() {
KNOWN_RELEASE_FILES=$(echo "(arch|alpine|centos|debian|ubuntu|fedora|redhat|suse|\
mandrake|mandriva|gentoo|slackware|turbolinux|unitedlinux|void|lsb|system|\
oracle|os)(-|_)(release|version)" | sed -r 's:[[:space:]]::g')
oracle|os)(-|_)(release|version)" | sed -E 's:[[:space:]]::g')
primary_release_files=""
secondary_release_files=""
# Sort know VS un-known files first
for release_file in $(echo "${@}" | sed -r 's:[[:space:]]:\n:g' | sort -f | uniq); do
for release_file in $(echo "${@}" | sed -E 's:[[:space:]]:\n:g' | sort -f | uniq); do
match=$(echo "$release_file" | grep -E -i "${KNOWN_RELEASE_FILES}")
if [ "${match}" != "" ]; then
primary_release_files="${primary_release_files} ${release_file}"
@ -962,7 +963,7 @@ __sort_release_files() {
done
# Echo the results collapsing multiple white-space into a single white-space
echo "${primary_release_files} ${secondary_release_files}" | sed -r 's:[[:space:]]+:\n:g'
echo "${primary_release_files} ${secondary_release_files}" | sed -E 's:[[:space:]]+:\n:g'
}
@ -1181,17 +1182,17 @@ __gather_sunos_system_info() {
case "$line" in
*OpenIndiana*oi_[0-9]*)
DISTRO_NAME="OpenIndiana"
DISTRO_VERSION=$(echo "$line" | sed -nr "s/OpenIndiana(.*)oi_([[:digit:]]+)(.*)/\\2/p")
DISTRO_VERSION=$(echo "$line" | sed -nE "s/OpenIndiana(.*)oi_([[:digit:]]+)(.*)/\\2/p")
break
;;
*OpenSolaris*snv_[0-9]*)
DISTRO_NAME="OpenSolaris"
DISTRO_VERSION=$(echo "$line" | sed -nr "s/OpenSolaris(.*)snv_([[:digit:]]+)(.*)/\\2/p")
DISTRO_VERSION=$(echo "$line" | sed -nE "s/OpenSolaris(.*)snv_([[:digit:]]+)(.*)/\\2/p")
break
;;
*Oracle*Solaris*[0-9]*)
DISTRO_NAME="Oracle Solaris"
DISTRO_VERSION=$(echo "$line" | sed -nr "s/(Oracle Solaris) ([[:digit:]]+)(.*)/\\2/p")
DISTRO_VERSION=$(echo "$line" | sed -nE "s/(Oracle Solaris) ([[:digit:]]+)(.*)/\\2/p")
break
;;
*Solaris*)
@ -1712,7 +1713,7 @@ echoinfo " Distribution: ${DISTRO_NAME} ${DISTRO_VERSION}"
echo
# Simplify distro name naming on functions
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -re 's/([[:space:]])+/_/g')
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -Ee 's/([[:space:]])+/_/g')
# Simplify version naming on functions
if [ "$DISTRO_VERSION" = "" ] || [ ${_SIMPLIFY_VERSION} -eq $BS_FALSE ]; then
@ -1790,7 +1791,7 @@ elif [ "${DISTRO_NAME_L}" = "debian" ]; then
__debian_codename_translation
fi
if [ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon|fedora)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]; then
if [ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon|fedora|macosx)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]; then
echoerror "${DISTRO_NAME} does not have major version pegged packages support"
exit 1
fi
@ -1981,7 +1982,7 @@ __git_clone_and_checkout() {
fi
case ${OS_NAME_L} in
openbsd|freebsd|netbsd )
openbsd|freebsd|netbsd|darwin )
__TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/')
;;
* )
@ -2507,7 +2508,7 @@ __activate_virtualenv() {
__install_pip_pkgs() {
_pip_pkgs="$1"
_py_exe="$2"
_py_pkg=$(echo "$_py_exe" | sed -r "s/\\.//g")
_py_pkg=$(echo "$_py_exe" | sed -E "s/\\.//g")
_pip_cmd="${_py_exe} -m pip"
if [ "${_py_exe}" = "" ]; then
@ -2911,9 +2912,11 @@ install_ubuntu_git() {
fi
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
${_PYEXE} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
# shellcheck disable=SC2086
"${_PYEXE}" setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
else
${_PYEXE} setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
# shellcheck disable=SC2086
"${_PYEXE}" setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
fi
return 0
@ -3395,9 +3398,11 @@ install_debian_git() {
fi
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
${_PYEXE} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
# shellcheck disable=SC2086
"${_PYEXE}" setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
else
${_PYEXE} setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
# shellcheck disable=SC2086
"${_PYEXE}" setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
fi
}
@ -4830,16 +4835,23 @@ install_amazon_linux_ami_2_git_deps() {
yum -y install ca-certificates || return 1
fi
PIP_EXE='pip'
if __check_command_exists python2.7; then
if ! __check_command_exists pip2.7; then
__yum_install_noinput python2-pip
fi
PIP_EXE='/bin/pip'
_PY_EXE='python2.7'
fi
install_amazon_linux_ami_2_deps || return 1
if __check_command_exists python3; then
if ! __check_command_exists pip3; then
__yum_install_noinput python3-pip
fi
PIP_EXE='/bin/pip3'
_PY_EXE='python3'
else
PIP_EXE='pip'
if __check_command_exists python2.7; then
if ! __check_command_exists pip2.7; then
__yum_install_noinput python2-pip
fi
PIP_EXE='/bin/pip'
_PY_EXE='python2.7'
fi
fi
if ! __check_command_exists git; then
__yum_install_noinput git || return 1
@ -4850,9 +4862,18 @@ install_amazon_linux_ami_2_git_deps() {
__PACKAGES=""
__PIP_PACKAGES=""
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
__PACKAGES="${__PACKAGES} python27-pip"
if [ "$PARSED_VERSION" -eq "2" ]; then
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then
__PACKAGES="${__PACKAGES} python3-pip"
__PIP_PACKAGES="${__PIP_PACKAGES} tornado<$_TORNADO_MAX_PY3_VERSION"
else
__PACKAGES="${__PACKAGES} python2-pip"
fi
else
__PACKAGES="${__PACKAGES} python27-pip"
fi
__PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
fi
@ -4860,7 +4881,7 @@ install_amazon_linux_ami_2_git_deps() {
# We're on the develop branch, install whichever tornado is on the requirements file
__REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
if [ "${__REQUIRED_TORNADO}" != "" ]; then
__PACKAGES="${__PACKAGES} ${pkg_append}-tornado"
__PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-tornado"
fi
fi
@ -4917,18 +4938,31 @@ install_amazon_linux_ami_2_deps() {
if [ $_DISABLE_REPOS -eq $BS_FALSE ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then
__REPO_FILENAME="saltstack-repo.repo"
__PY_VERSION_REPO="yum"
PY_PKG_VER=""
_PY_MAJOR_VERSION=$(echo "$_PY_PKG_VER" | cut -c 7)
repo_label="saltstack-repo"
repo_name="SaltStack repo for Amazon Linux 2"
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
__REPO_FILENAME="saltstack-py3-repo.repo"
__PY_VERSION_REPO="py3"
PY_PKG_VER=3
repo_label="saltstack-py3-repo"
repo_name="SaltStack Python 3 repo for Amazon Linux 2"
fi
base_url="$HTTP_VAL://${_REPO_URL}/yum/amazon/2/\$basearch/$repo_rev/"
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub
${base_url}base/RPM-GPG-KEY-CentOS-7"
repo_name="SaltStack repo for Amazon Linux 2.0"
base_url="$HTTP_VAL://${_REPO_URL}/${__PY_VERSION_REPO}/amazon/2/\$basearch/$repo_rev/"
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7"
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub"
fi
# This should prob be refactored to use __install_saltstack_rhel_repository()
# With args passed in to do the right thing. Reformatted to be more like the
# amazon linux yum file.
if [ ! -s "/etc/yum.repos.d/${__REPO_FILENAME}" ]; then
cat <<_eof > "/etc/yum.repos.d/${__REPO_FILENAME}"
[saltstack-repo]
[$repo_label]
name=$repo_name
failovermethod=priority
priority=10
@ -4942,9 +4976,14 @@ _eof
# Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64
# which is already installed
__PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 PyYAML procps-ng"
__PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq"
__PACKAGES="${__PACKAGES} ${pkg_append}-futures"
if [ "${PY_PKG_VER}" -eq 3 ]; then
__PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml"
else
__PACKAGES="m2crypto PyYAML ${pkg_append}-futures"
fi
__PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng"
__PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq"
# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
@ -5025,6 +5064,12 @@ install_amazon_linux_ami_2_testing_post() {
install_centos_testing_post || return 1
return 0
}
install_amazon_linux_ami_2_check_services() {
install_centos_check_services || return 1
return 0
}
#
# Ended Amazon Linux AMI Install Functions
#
@ -5240,158 +5285,32 @@ install_arch_check_services() {
# FreeBSD Install Functions
#
__freebsd_get_packagesite() {
if [ "$CPU_ARCH_L" = "amd64" ]; then
BSD_ARCH="x86:64"
elif [ "$CPU_ARCH_L" = "x86_64" ]; then
BSD_ARCH="x86:64"
elif [ "$CPU_ARCH_L" = "i386" ]; then
BSD_ARCH="x86:32"
elif [ "$CPU_ARCH_L" = "i686" ]; then
BSD_ARCH="x86:32"
fi
# Since the variable might not be set, don't, momentarily treat it as a
# failure
set +o nounset
# ABI is a std format for identifying release / architecture combos
ABI="freebsd:${DISTRO_MAJOR_VERSION}:${BSD_ARCH}"
_PACKAGESITE="http://pkg.freebsd.org/${ABI}/latest"
# Awkwardly, we want the `${ABI}` to be in conf file without escaping
PKGCONFURL="pkg+http://pkg.freebsd.org/\${ABI}/latest"
SALTPKGCONFURL="http://repo.saltstack.com/freebsd/\${ABI}/"
# Treat unset variables as errors once more
set -o nounset
}
# Using a separate conf step to head for idempotent install...
__configure_freebsd_pkg_details() {
## pkg.conf is deprecated.
## We use conf files in /usr/local or /etc instead
mkdir -p /usr/local/etc/pkg/repos/
mkdir -p /etc/pkg/
## Use new JSON-like format for pkg repo configs
## check if /etc/pkg/FreeBSD.conf is already in place
if [ ! -f /etc/pkg/FreeBSD.conf ]; then
conf_file=/usr/local/etc/pkg/repos/freebsd.conf
{
echo "FreeBSD:{"
echo " url: \"${PKGCONFURL}\","
echo " mirror_type: \"srv\","
echo " signature_type: \"fingerprints\","
echo " fingerprints: \"/usr/share/keys/pkg\","
echo " enabled: true"
echo "}"
} > $conf_file
__copyfile $conf_file /etc/pkg/FreeBSD.conf
fi
FROM_FREEBSD="-r FreeBSD"
##### Workaround : Waiting for SaltStack Repository to be available for FreeBSD 12 ####
if [ "${DISTRO_MAJOR_VERSION}" -ne 12 ]; then
## add saltstack freebsd repo
salt_conf_file=/usr/local/etc/pkg/repos/saltstack.conf
{
echo "SaltStack:{"
echo " url: \"${SALTPKGCONFURL}\","
echo " mirror_type: \"http\","
echo " enabled: true"
echo " priority: 10"
echo "}"
} > $salt_conf_file
FROM_SALTSTACK="-r SaltStack"
fi
##### End Workaround : Waiting for SaltStack Repository to be available for FreeBSD 12 ####
## ensure future ports builds use pkgng
echo "WITH_PKGNG= yes" >> /etc/make.conf
/usr/local/sbin/pkg update -f || return 1
_SALT_ETC_DIR="/usr/local/etc/salt"
}
install_freebsd_9_stable_deps() {
_SALT_ETC_DIR=${BS_SALT_ETC_DIR:-/usr/local/etc/salt}
_PKI_DIR=${_SALT_ETC_DIR}/pki
if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then
#make variables available even if pkg already installed
__freebsd_get_packagesite
if [ ! -x /usr/local/sbin/pkg ]; then
# install new `pkg` code from its own tarball.
fetch "${_PACKAGESITE}/Latest/pkg.txz" || return 1
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static" || return 1
./pkg-static add ./pkg.txz || return 1
/usr/local/sbin/pkg2ng || return 1
fi
# Configure the pkg repository using new approach
__configure_freebsd_pkg_details || return 1
fi
# Now install swig30
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y swig30 || return 1
# YAML module is used for generating custom master/minion configs
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y py27-yaml || return 1
if [ "${_EXTRA_PACKAGES}" != "" ]; then
echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}"
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${_EXTRA_PACKAGES} || return 1
fi
if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then
pkg upgrade -y || return 1
fi
return 0
}
install_freebsd_10_stable_deps() {
install_freebsd_9_stable_deps
}
install_freebsd_11_stable_deps() {
install_freebsd_9_stable_deps
}
install_freebsd_12_stable_deps() {
install_freebsd_9_stable_deps
install_freebsd_deps() {
__configure_freebsd_pkg_details
pkg install -y pkg
}
install_freebsd_git_deps() {
install_freebsd_9_stable_deps || return 1
install_freebsd_stable_deps || return 1
SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search -R -d py36-salt | grep 'origin:' \
| tail -n +2 | awk -F\" '{print $2}' | sed 's#.*/py-#py36-#g')
# shellcheck disable=SC2086
SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search ${FROM_FREEBSD} -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ')
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${SALT_DEPENDENCIES} || return 1
# install python meta package
/usr/local/sbin/pkg install -y lang/python || return 1
/usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} || return 1
if ! __check_command_exists git; then
/usr/local/sbin/pkg install -y git || return 1
fi
/usr/local/sbin/pkg install -y www/py-requests || return 1
/usr/local/sbin/pkg install -y py36-requests || return 1
__git_clone_and_checkout || return 1
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
# We're on the develop branch, install whichever tornado is on the requirements file
__REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
if [ "${__REQUIRED_TORNADO}" != "" ]; then
/usr/local/sbin/pkg install -y www/py-tornado4 || return 1
fi
fi
echodebug "Adapting paths to FreeBSD"
# The list of files was taken from Salt's BSD port Makefile
for file in doc/man/salt-key.1 doc/man/salt-cp.1 doc/man/salt-minion.1 \
@ -5430,34 +5349,12 @@ install_freebsd_git_deps() {
return 0
}
install_freebsd_9_stable() {
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_SALTSTACK} -y sysutils/py-salt || return 1
return 0
}
install_freebsd_10_stable() {
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y sysutils/py-salt || return 1
return 0
}
install_freebsd_11_stable() {
install_freebsd_stable() {
#
# installing latest version of salt from FreeBSD CURRENT ports repo
#
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y sysutils/py-salt || return 1
return 0
}
install_freebsd_12_stable() {
#
# installing latest version of salt from FreeBSD CURRENT ports repo
#
# shellcheck disable=SC2086
/usr/local/sbin/pkg install ${FROM_FREEBSD} -y sysutils/py-salt || return 1
/usr/local/sbin/pkg install -y py36-salt || return 1
return 0
}
@ -5499,7 +5396,7 @@ install_freebsd_git() {
return 0
}
install_freebsd_9_stable_post() {
install_freebsd_stable_post() {
for fname in api master minion syndic; do
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -5509,34 +5406,15 @@ install_freebsd_9_stable_post() {
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
enable_string="salt_${fname}_enable=\"YES\""
enable_string="salt_${fname}_enable=YES"
grep "$enable_string" /etc/rc.conf >/dev/null 2>&1
[ $? -eq 1 ] && echo "$enable_string" >> /etc/rc.conf
[ $? -eq 1 ] && sysrc $enable_string
if [ $fname = "minion" ] ; then
grep "salt_minion_paths" /etc/rc.conf >/dev/null 2>&1
[ $? -eq 1 ] && echo "salt_minion_paths=\"/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin\"" >> /etc/rc.conf
fi
done
}
install_freebsd_10_stable_post() {
install_freebsd_9_stable_post
}
install_freebsd_11_stable_post() {
install_freebsd_9_stable_post
}
install_freebsd_12_stable_post() {
install_freebsd_9_stable_post
}
install_freebsd_git_post() {
if [ -f $salt_conf_file ]; then
rm -f $salt_conf_file
fi
install_freebsd_9_stable_post || return 1
install_freebsd_stable_post || return 1
return 0
}
@ -6750,6 +6628,11 @@ install_macosx_stable_deps() {
install_macosx_git_deps() {
install_macosx_stable_deps || return 1
if ! echo "$PATH" | grep -q /usr/local/bin; then
echowarn "/usr/local/bin was not found in \$PATH. Adding it for the duration of the script execution."
export PATH=/usr/local/bin:$PATH
fi
__fetch_url "/tmp/get-pip.py" "https://bootstrap.pypa.io/get-pip.py" || return 1
if [ -n "$_PY_EXE" ]; then
@ -6802,14 +6685,18 @@ install_macosx_git() {
}
install_macosx_stable_post() {
if [ ! -f /etc/paths.d/salt ]; then
print "%s\n" "/opt/salt/bin" "/usr/local/sbin" > /etc/paths.d/salt
fi
if [ ! -f /etc/paths.d/salt ]; then
print "%s\n" "/opt/salt/bin" "/usr/local/sbin" > /etc/paths.d/salt
fi
# shellcheck disable=SC1091
. /etc/profile
# Don'f fail because of unknown variable on the next step
set +o nounset
# shellcheck disable=SC1091
. /etc/profile
# Revert nounset to it's previous state
set -o nounset
return 0
return 0
}
install_macosx_git_post() {

View file

@ -763,6 +763,9 @@ def set_fstab(
'securityfs',
'devtmpfs',
'cgroup',
'nfs',
'nfs4',
'glusterfs',
'btrfs'])
if fstype in specialFSes:

View file

@ -5,6 +5,7 @@ Support for nftables
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import json
import logging
import re
@ -301,6 +302,36 @@ def get_saved_rules(conf_file=None):
return rules
def list_tables(family='ipv4'):
'''
Return a data structure of the current, in-memory tables
CLI Example:
.. code-block:: bash
salt '*' nftables.list_tables
salt '*' nftables.list_tables family=ipv6
'''
nft_family = _NFTABLES_FAMILIES[family]
tables = []
cmd = '{0} --json --numeric --numeric --numeric ' \
'list tables {1}'. format(_nftables_cmd(),
nft_family)
out = __salt__['cmd.run'](cmd, python_shell=False)
if not out:
return tables
data = json.loads(out)
for item in data.get('nftables', []):
if 'metainfo' not in item:
tables.append(item['table'])
log.debug(tables)
return tables
def get_rules(family='ipv4'):
'''
Return a data structure of the current, in-memory rules
@ -314,18 +345,12 @@ def get_rules(family='ipv4'):
salt '*' nftables.get_rules family=ipv6
'''
tables = list_tables(family)
nft_family = _NFTABLES_FAMILIES[family]
rules = []
cmd = '{0} --numeric --numeric --numeric ' \
'list tables {1}'. format(_nftables_cmd(),
nft_family)
out = __salt__['cmd.run'](cmd, python_shell=False)
if not out:
return rules
tables = re.split('\n+', out)
rules = []
for table in tables:
table_name = table.split(' ')[1]
table_name = table['name']
cmd = '{0} --numeric --numeric --numeric ' \
'list table {1} {2}'.format(_nftables_cmd(),
nft_family, table_name)
@ -359,7 +384,7 @@ def save(filename=None, family='ipv4'):
try:
with salt.utils.files.fopen(filename, 'wb') as _fh:
# Write out any changes
_fh.writelines(salt.utils.data.encode(rules))
_fh.write(salt.utils.data.encode(rules))
except (IOError, OSError) as exc:
raise CommandExecutionError(
'Problem writing to configuration file: {0}'.format(exc)

View file

@ -325,6 +325,8 @@ def mounted(name,
if label_device and label_device not in device_list:
device_list.append(label_device)
if opts:
opts.sort()
mount_invisible_options = [
'_netdev',
'actimeo',

View file

@ -94,18 +94,51 @@ class NftablesTestCase(TestCase, LoaderModuleMockMixin):
with patch.object(salt.utils.files, 'fopen', MagicMock(mock_open())):
self.assertListEqual(nftables.get_saved_rules(), [])
# 'list_tables' function tests: 1
def test_list_tables(self):
'''
Test if it return a data structure of the current, in-memory tables
'''
list_tables = [{'family': 'inet', 'name': 'filter', 'handle': 2}]
list_tables_mock = MagicMock(return_value=list_tables)
with patch.object(nftables, 'list_tables', list_tables_mock):
self.assertListEqual(nftables.list_tables(), list_tables)
list_tables_mock = MagicMock(return_value=[])
with patch.object(nftables, 'list_tables', list_tables_mock):
self.assertListEqual(nftables.list_tables(), [])
# 'get_rules' function tests: 1
def test_get_rules(self):
'''
Test if it return a data structure of the current, in-memory rules
'''
mock = MagicMock(return_value='SALT STACK')
with patch.dict(nftables.__salt__, {'cmd.run': mock}):
self.assertListEqual(nftables.get_rules(), ['SALT STACK'])
list_tables_mock = MagicMock(return_value=[{'family': 'inet', 'name': 'filter', 'handle': 2}])
list_rules_return = """table inet filter {
chain input {
type filter hook input priority 0; policy accept;
}
mock = MagicMock(return_value=False)
with patch.dict(nftables.__salt__, {'cmd.run': mock}):
chain forward {
type filter hook forward priority 0; policy accept;
}
chain output {
type filter hook output priority 0; policy accept;
}
}"""
list_rules_mock = MagicMock(return_value=list_rules_return)
expected = [list_rules_return]
with patch.object(nftables, 'list_tables', list_tables_mock):
with patch.dict(nftables.__salt__, {'cmd.run': list_rules_mock}):
self.assertListEqual(nftables.get_rules(), expected)
list_tables_mock = MagicMock(return_value=[])
with patch.object(nftables, 'list_tables', list_tables_mock):
self.assertListEqual(nftables.get_rules(), [])
# 'save' function tests: 1

View file

@ -447,6 +447,56 @@ class MountTestCase(TestCase, LoaderModuleMockMixin):
self.assertDictEqual(mount.mod_watch(name, sfun='unmount'), ret)
def test_mounted_multiple_mounts(self):
'''
Test to verify that a device is mounted.
'''
name = '/mnt/nfs1'
device = 'localhost:/mnt/nfsshare'
fstype = 'nfs4'
name2 = '/mnt/nfs2'
device2 = 'localhost:/mnt/nfsshare'
fstype2 = 'nfs4'
ret = {'name': name,
'result': False,
'comment': '',
'changes': {}}
mock = MagicMock(side_effect=['new', 'present', 'new', 'change',
'bad config', 'salt', 'present'])
mock_t = MagicMock(return_value=True)
mock_f = MagicMock(return_value=False)
mock_ret = MagicMock(return_value={'retcode': 1})
mock_mnt = MagicMock(return_value={name: {'device': device, 'opts': [],
'superopts': []}})
mock_read_cache = MagicMock(return_value={})
mock_write_cache = MagicMock(return_value=True)
mock_user = MagicMock(return_value={'uid': 510})
mock_group = MagicMock(return_value={'gid': 100})
mock_str = MagicMock(return_value='salt')
mock_fstab_config = ['localhost:/mnt/nfsshare /mnt/nfs1 nfs defaults 0 0']
# Test no change for uid provided as a name #25293
with patch.dict(mount.__grains__, {'os': 'CentOS'}):
with patch.dict(mount.__opts__, {'test': True}):
with patch.dict(mount.__salt__, {'mount.active': mock_mnt,
'mount.mount': mock_str,
'mount.umount': mock_f,
'mount.read_mount_cache': mock_read_cache,
'mount.write_mount_cache': mock_write_cache,
'user.info': mock_user,
'group.info': mock_group}):
with patch.object(os.path, 'exists', mock_t):
comt = '/mnt/nfs2 would be mounted'
ret.update({'name': name2, 'result': None})
ret.update({'comment': comt, 'changes': {}})
self.assertDictEqual(mount.mounted(name2, device2,
fstype2,
opts=[]),
ret)
def test__convert_to_fast_none(self):
'''
Test the device name conversor

View file

@ -224,6 +224,15 @@ class NetworkTestCase(TestCase):
# https://github.com/saltstack/salt/issues/51258
self.assertFalse(network.is_ipv6('sixteen-char-str'))
def test_ipv6(self):
self.assertTrue(network.ipv6('2001:db8:0:1:1:1:1:1'))
self.assertTrue(network.ipv6('0:0:0:0:0:0:0:1'))
self.assertTrue(network.ipv6('::1'))
self.assertTrue(network.ipv6('::'))
self.assertTrue(network.ipv6('2001:0db8:85a3:0000:0000:8a2e:0370:7334'))
self.assertTrue(network.ipv6('2001:0db8:85a3::8a2e:0370:7334'))
self.assertTrue(network.ipv6('2001:67c:2e8::/48'))
def test_parse_host_port(self):
_ip = ipaddress.ip_address
good_host_ports = {