Commit graph

113116 commits

Author SHA1 Message Date
Pedro Algarvio
75ed972d72 Update requirements to address know security vulnerabilities
Closes #61516
Closes #61515
Closes #61514
Closes #61513
Closes #61520
Closes #61096
Closes #60944
Closes #61558
Closes #61559
Closes #61560
Closes #61561

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-02-08 06:34:43 -08:00
David Hilton
a575896ef0
Merge pull request #61150 from mymindstorm/splunk-event-returner
Add event return capability to Splunk returner
2022-02-07 14:34:23 -07:00
Pedro Algarvio
92cb1010c7 Upgrade to `pytest-salt-factories==0.912.1`
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-02-07 12:16:44 -08:00
Simon McVittie
7071188bc9 salt.states.iptables: Clarify effect of adding pre-existing rules
If a rule is already in the table but at a different position, there
would be several plausible things to do: either add it to the specified
position (duplicating the existing rule), or treat the pre-existing copy
as sufficient even though it is not in the specifed position, or raise an
error. In fact Salt treats the pre-existing copy as sufficient.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-07 12:04:41 -08:00
Simon McVittie
b8a0962ed8 salt.modules.iptables: Cross-reference to iptables-persistent
Debian's iptables package provides mechanism but not policy, and in
particular doesn't load rules during system startup. There are
several packages that can provide that, but the only one Salt supports
appears to be iptables-persistent.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-07 12:04:41 -08:00
Simon McVittie
497ebde113 salt.states.iptables: Document the save parameter
The examples mention this, but the reference documentation did not,
and it isn't obvious from the example that minimal installations of
some operating systems (in particular Debian) don't have all the
necessary packages to make it effective, even if iptables itself is
installed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-07 12:04:41 -08:00
David Hilton
394e41012c
Merge branch 'master' into splunk-event-returner 2022-02-07 10:09:58 -07:00
Pedro Algarvio
76efef6e86 Re-enable tiamat-pip on windows
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-02-07 07:26:02 -08:00
David Murphy
b398065003 Removed changelog file since documentation bug 2022-02-04 16:49:19 -05:00
David Murphy
1e0906b679 Corrected documentation and minion configuration setting for auto recover for Master IP changes 2022-02-04 16:49:19 -05:00
Wayne Werner
a8f0094c38
Correct docstring for test_virtual (#61529)
* Correct docstring for test_virtual

This module is actually just used for testing, it's not a module that actually has any utility.

* 🤷
2022-02-04 16:48:16 -05:00
nicholasmhughes
b677222e9e handle compressing multiple mod.fun combos under an id 2022-02-04 15:29:11 -05:00
nicholasmhughes
e6621e2a7a dict order is only important to the tests and py3.5 soon to be gone 2022-02-04 15:29:11 -05:00
nicholasmhughes
635f2ce416 need full dict order for test data retained throughout 2022-02-04 15:29:11 -05:00
nicholasmhughes
76b3452a77 use the compare_dicts utility instead fo relying on order 2022-02-04 15:29:11 -05:00
nicholasmhughes
908ce2e3f0 use OrderedDict more completely 2022-02-04 15:29:11 -05:00
nicholasmhughes
b121211dba use OrderedDict until py3.5 support is dropped 2022-02-04 15:29:11 -05:00
nicholasmhughes
7e1c2baa65 fixes saltstack/salt#61549 allow roll-up of duplicate IDs with different names 2022-02-04 15:29:11 -05:00
Victor Zhestkov
9c5b4f2737 Add changelog entry 2022-02-04 14:15:42 -05:00
Victor Zhestkov
8ea5342cbd Fix exception in yumpkg.remove for not installed package 2022-02-04 14:15:42 -05:00
Justin Findlay
95fb5161c7 salt.utils.templates Add docstrings to some functions
Some functions in salt/utils/templates.py were undocumented.
2022-02-04 13:18:56 -05:00
Justin Findlay
858e3611fe Add tests and changelog for jinja UndefinedError context
Add a test to reinforce that salt will provide context when
`jinja2.exceptions.UndefinedError` is raised.
2022-02-04 13:18:56 -05:00
Joe Groocock
d4731a548d Print jinja error context on UndefinedError
This provides both the line number on which the error occurred in the
Jinja template, and also several lines of context around the error in
the Jinja template source.

The one caveat to this change is that if paired with jinja2<2.11 it
could possibly report incorrect line numbers for some errors. This was
fixed in https://github.com/pallets/jinja/pull/1109

Traces/errors before were vague and ambiguous:

    File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 387, in render_jinja_tmpl
      buf=tmplstr)
    SaltRenderError: Jinja variable 'str object' has no attribute 'items'

This gives a line number and multiple lines of context:

    File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 387, in render_jinja_tmpl
      tmplstr)
    SaltRenderError: Jinja variable 'str object' has no attribute 'items'; line 5

    ---
    # {{ salt.pillar.get('managed_by_salt_message', '') }}
    # salt template: {{ source }}

    {%- for section in sections %}
      {%- for name, config in section.items() %}    <======================
    [{{ name }}]
        {%- for line in config %}
    {{ line }}
        {%- endfor %}
      {%- endfor %}
    [...]
    ---

Signed-off-by: Joe Groocock <jgroocock@cloudflare.com>
2022-02-04 13:18:56 -05:00
Megan Wilhite
208ec48e5b Update size in vultr cloud test 2022-02-04 10:16:07 -08:00
Alan Somers
389982f4fc Make the tests more deterministic 2022-02-04 10:15:44 -08:00
Alan Somers
25178edfc6 Fix two just-introduced regressions in the ZFS states:
* a "filesystem.present" or "volume.present" state that specified no
  properties would fail because it would execute "zfs get" with no property
  argument.  Fix this (and improve performance too) by skipping the "zfs
  get" if the user does not request any property values.

* A "volume.present" state that specified volume_size but no properties
  would fail to check the volsize.

Also, make the properties argument of _dataset_properties a mandatory
argument rather than a keyword argument.  All callers already specify this
argument, making the default value a red herring.
2022-02-04 10:15:44 -08:00
Alan Somers
85d6d93b5e Make test_filesystem_present_properties more resilient
Remove an assumption about the order of python's hash function.
2022-02-04 10:15:44 -08:00
krionbsd
359243efb9 Fix pre-commit and linting 2022-02-04 10:15:44 -08:00
Alan Somers
c51093a503 Speed up zfs.filesystem_present
Only look up the requested properties in ZFS, instead of all properties.
This affects zfs.volume_present, too.

Sponsored by: Axcient
2022-02-04 10:15:44 -08:00
Megan Wilhite
8afc0708d3 Do not edit profile config for vmware test 2022-02-04 08:49:23 -05:00
David Murphy
b46746e150
Merge pull request #60731 from TUBtogra/master
Remove malformed interfaces outside of loop
2022-02-03 18:43:07 -07:00
David Murphy
39988e98f8
Merge branch 'master' into master 2022-02-03 15:32:28 -07:00
David Murphy
2d29d45d3e
Merge pull request #61556 from dmurphy18/napalm_mod_https_bug59448
Set default transport and port settings for Napalm NXOS, if not set
2022-02-03 09:06:50 -07:00
David Murphy
ec65b0ed65
Merge branch 'master' into napalm_mod_https_bug59448 2022-02-02 18:33:54 -07:00
David Murphy
6d1db5ea82
Merge pull request #61563 from OrangeDog/fix-61557
Fix uptime on AIX systems when less than 24 hours
2022-02-02 18:30:59 -07:00
David Murphy
a13fe4f779
Clean up left over comments 2022-02-02 18:28:37 -07:00
David Murphy
32ea3758ea
Remove debug logging 2022-02-02 14:56:36 -07:00
David Murphy
270a94fbff
Set default transport and port settings for Napalm NXOS, if not set 2022-02-02 14:56:32 -07:00
David Murphy
b853504bc1
Merge branch 'master' into fix-61557 2022-02-02 11:05:07 -07:00
krionbsd
2d3d79de3c Remove CentOS 8 from CI as it's reached its end-of-life 2022-02-02 12:42:18 -05:00
nicholasmhughes
ec41b56bae detect reference cycles in flatten function 2022-02-02 09:03:41 -08:00
nicholasmhughes
c3e28fda4c dicts are unordered so tests need to check permutations 2022-02-02 09:03:41 -08:00
nicholasmhughes
2654031816 fix itertools doc links 2022-02-02 09:03:41 -08:00
nicholasmhughes
ad0c5f71d3 fixing doc underlines 2022-02-02 09:03:41 -08:00
nicholasmhughes
1896093c7f copy paste error 2022-02-02 09:03:41 -08:00
nicholasmhughes
ee5f6aedfb title underline too short 2022-02-02 09:03:41 -08:00
nicholasmhughes
8ba7f81502 fixes saltstack/salt#61502 add jinja filters 2022-02-02 09:03:41 -08:00
OrangeDog
7fabb22f3e Fix uptime on AIX systems when less than 24 hours 2022-02-02 12:33:51 +00:00
Sander Cornelissen
31b5d6f66a Add documentation for agent_get_ip 2022-02-01 15:08:35 -05:00
Sander Cornelissen
a5679caf65 Add support for get IP-address from agent 2022-02-01 15:08:35 -05:00