Whenever there are no changes in the registry, win_pkg.install will check for any difference applied to it 1001 times before giving up, this causes an unnecessary CPU spike that may lead to performance degradation on the host or in any of its running applications, and if the host it's an AWS burstable instance this may cause unnecessary CPU credit consumption.
This commit changes that behaviour: the module will now check for any difference for a maximum of 10 times with an interval of 3 seconds before giving up.
See https://github.com/saltstack/salt/issues/30230.
When appending content to a file, salt will try to search for that content first. During this
operation whitespace is ignored. This option allows to override this bahavior.
Fixes#28586.
This overrides the state_verbose setting that may be set in master config.
If master has state_verbose set to True
--state-verbose=False would suppress states that didn't change.
If master config has state_verbose set to False
--state-verbose=True would still show states that didn't have changes.
Below is test output with state_verbose=True in ./etc/salt/master:
```
$ salt -c ./etc/salt '*' --state-verbose=True state.highstate
salt-dev:
----------
ID: test_file.txt
Function: file.managed
Name: /tmp/test_file.txt
Result: True
Comment: File /tmp/test_file.txt exists with proper permissions. No changes made.
Started: 13:51:15.798599
Duration: 7.176 ms
Changes:
Summary for salt-dev
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 7.176 ms
$ salt -c ./etc/salt '*' --state-verbose=False state.highstate
salt-dev:
Summary for salt-dev
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 8.589 ms
```
Looks like atomic_open() doesn't take care of preserving file permissions. It will create
a new file, edit it and then move this temp file to the original file ignoring file permissions.
Also updated the check to be sure file exist and is a file. Otherwise code will try to update
directory content and will fail badly and throw a python error.
Warnings for passing kwargs with equal signs as part of the value
exist in other file.x functions, but was missing for the file.line
execution module function. This adds the relevant warning.
Fixes#28923
If you specify a profile, you need to have key, keyid, and region set within
the profile. If region is set outside of the profile group, it is ignored,
and a default region is used.
This pull request updates the docs to model this usage correctly.
This fixes the file.serialize state on windows.
Currently, it fails on the first run (with "Failed to change group to Administrators" and succeeds on runs afterwards.
When I wrote dockerng, I was scraping the API response for the ID of the
image specified in the docker 'push' command. This information is no
longer present in the Docker Remote API response, which makes the
function think that the push failed when it did not.
This commit removes the ``Id`` and ``Image`` keys from the return
dictionary, as they can no longer reliably be determined from the API
response without it being some sort of hack that will no doubt be broken
the next time Docker decides to change their API.
Not only that, but the status message used to detect a pushed or
already-present layer has also been changed, which necessitated a fix in
``_push_status()``.
This also resolves#29994 by allowing the user to push all tags for a
given repo by omitting the tag.