Commit Graph

77446 Commits

Author SHA1 Message Date
Mike Place
4d0f5c433d Merge pull request #41679 from terminalmage/get-top-file-envs
Prevent unnecessary duplicate pillar compilation
2017-06-21 10:32:42 -05:00
Erik Johnson
a916e8da49 Improve normalization of saltenv/pillarenv usage for states 2017-06-21 08:49:34 -05:00
Erik Johnson
02f293a19c Update state unit tests to reflect recent changes 2017-06-21 08:19:05 -05:00
Erik Johnson
b7e5c11165 Don't compile pillar data when getting top file envs
This prevents an unnecessary pillar compile when syncing custom types,
in cases where the saltenv is not specified.
2017-06-21 08:19:05 -05:00
Erik Johnson
8d6fdb7c9a Don't compile pillar twice for salt-call
This modifies the "state" exec module to use __pillar__ as the pillar
data for the state run rather than compiling fresh pillar, unless the
pillarenv has been changed from the configured value, keeping salt-call
from unnecessarily compiling pillar a second time.

It also normalizes saltenv/pillarenv support in functions that should
have had it but did not.
2017-06-21 08:19:05 -05:00
Erik Johnson
d2abfbf4ed Add initial_pillar argument to salt.state
This allows for salt.state.State() instances to have their initial
pillar data passed into them, rather than calling _gather_pillar() to
compile fresh pillar data. This allows for the __pillar__ dunder to be
used directly for salt-call (when the pillarenv is unchanged). Since the
__pillar__ is compiled at the beginning of a salt-call, this prevents
duplicate pillar rendering from happening when salt-call is invoked.
2017-06-21 08:19:05 -05:00
Erik Johnson
70186de532 salt.pillar: rename the "pillar" argument to "pillar_override"
This differentiates CLI pillar override with an eventual future
"initial_pillar" argument which will seed the Pillar class with initial
data.
2017-06-21 08:19:01 -05:00
garethgreenaway
29b0acc3a2 Merge pull request #41853 from vutny/fix-master-schedule-event
Fix master side scheduled jobs to return events
2017-06-20 15:06:29 -07:00
Mike Place
afc61ffe63 Merge pull request #41861 from twangboy/fix_win_firewall
Fix problems with get_rule and delete_rule
2017-06-20 15:37:23 -05:00
Mike Place
938d4fddf1 Merge pull request #41787 from skizunov/develop3
Fix #41778
2017-06-20 15:11:22 -05:00
Mike Place
03b6ae5ea8 Merge pull request #41812 from skizunov/develop4
TCP: Fix salt-master in bad state if remote side closed connection
2017-06-20 14:46:53 -05:00
twangboy
78892074f5 Fix problems with get_rule and delete_rule 2017-06-20 12:48:46 -06:00
Mike Place
cf2252bcea Merge pull request #41857 from dmurphy18/netstat_fix
Modified support for deprecated netstat being removed by utilizing ss
2017-06-20 13:46:27 -05:00
garethgreenaway
12ec5f9f23 Merge pull request #41837 from rallytime/fix-40878
Add fingerpint_hash_type option to ssh_auth state and related functions
2017-06-20 11:14:52 -07:00
Sergey Kizunov
2ffd20cede Fix #41778
An explanation of why this fixes #41778 (which appeared after merging
PR #41436).

The following is true both before PR #41436 was merged and after it
was merged:
- On Tornado 4.2.1, `SyncWrapper.__del__` is sometimes invoked twice.
  When this happens, `self.io_loop.close()` is also invoked twice.
- On Tornado 4.5.1, `SyncWrapper.__del__` is never invoked twice. Hence
  this issue doesn't appear when using that version of Tornado.

Why did PR #41436 cause this issue?
- What that PR essentially did was ensure that there were no pending
I/O operations left in the I/O Loop before the I/O Loop was closed.
It essentially "drained out" the pending future that came from
`self._read_until_future` which let `SaltMessageClient._stream_return()`
complete. Tornado 4.2.1 seems to allow a call to close an I/O Loop
twice if it still has pending operations, but will throw the
`ValueError` exception if you attempt to close an empty I/O Loop twice.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-06-20 12:40:59 -05:00
David Murphy
017fbdbc53 Modified support for deprecated netstat being removed by utilizing ss 2017-06-20 11:28:22 -06:00
Denys Havrysh
e206c381c6 Fix master side scheduled jobs to return events 2017-06-20 17:21:35 +03:00
Mike Place
e7fc30f482 Merge pull request #41839 from cro/extend_proxy_to_jinja
Extend proxy to jinja
2017-06-19 18:03:00 -05:00
Mike Place
58387b127a Merge pull request #41786 from whiteinge/runner-arg-parsing-regressions
Runner arg parsing regressions
2017-06-19 18:00:06 -05:00
C. R. Oldham
172d3520ea Merge branch 'extend_proxy_to_jinja' of github.com:cro/salt into extend_proxy_to_jinja 2017-06-19 13:55:49 -06:00
C. R. Oldham
2ffad2af35 Extend __proxy__ to jinja as proxy (like __salt__->salt) 2017-06-19 13:55:20 -06:00
rallytime
48ff5d2a62 Add fingerpint_hash_type option to ssh_auth state and related functions
In PR #40543, the fingerprint_hash_type option was added to the state
function in salt/states/ssh_known_hosts.py, as well as the function in
the ssh execution module that the ssh_known_hosts states called out to.

This caused issue #40878 because the fingerprint_hash_type state setting
was not added to the salt/states/ssh_auth.py file. This PR adds this
setting to the ssh_auth file, as well as the functions that are used in
the ssh execution module. This allows the user to set the fingerprint_hash_type
option so avoid the warnings about the default changing.

Fixes #40878
2017-06-19 13:31:11 -06:00
Sergey Kizunov
736420eb83 TCP: Fix salt-master in bad state if remote side closed connection
If the remote side closes the connection (which could happen if its own
timeout is hit due to the master taking too long to respond or if it
is shutting down), it puts the salt-master in a bad state where further
minions cannot connect to it. This fixes the issue by absorbing the
`StreamClosedError` exception so that
`TCPReqServerChannel.handle_message` doesn't leak any exceptions
which would put the salt-master in a bad state. Absorb other
exceptions as well just in case.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-06-19 12:35:06 -05:00
Mike Place
be0e9abedb Merge pull request #41776 from gtmanfred/2016.11
npm 5.0.0 added a second line after fsevents
2017-06-19 11:53:42 -05:00
Mike Place
d94d4e4d19 Merge pull request #41783 from rallytime/config-doc-updates
Add a bunch of config options to the various master/minion files that are missing
2017-06-19 11:42:54 -05:00
garethgreenaway
2c681887d3 Merge pull request #41816 from twangboy/update_psutil_req
Upgrade psutil to version 5.2.2
2017-06-16 18:51:28 -07:00
twangboy
8b4e3ad77d Upgrade psutil to version 5.2.2 2017-06-16 17:59:50 -06:00
Nicole Thomas
3e5fe7ca4b Merge pull request #41803 from terminalmage/issue41785
Don't log an error when no top.sls is found
2017-06-16 16:49:07 -06:00
garethgreenaway
d12bc4ee68 Merge pull request #41801 from terminalmage/issue41781-2016.11
Don't take hostname from name param when creating docker container (2016.11 branch)
2017-06-16 10:02:01 -07:00
Erik Johnson
f9f4d49f05 Don't log an error when no top.sls is found
It is a valid use case to only derive your SLS matches via master_tops,
so it should not be considered an error if no top file matches are
found.
2017-06-16 11:07:56 -05:00
Erik Johnson
8236d3e1c3 Don't take hostname from name param when creating docker container (2016.11 branch) 2017-06-16 10:05:35 -05:00
Seth House
bf15c0bb5f Restore sending __current_eauth_* through to the function
I had forgotten this was originally added in #32133 specifically so that
it would be availble to the called function.
2017-06-15 17:43:54 -06:00
Seth House
6be975da2c Fix regressions from not calling load_args_and_kwargs
PR #39472 regressed ignoring invalid kwargs (#40845, #41733).
2017-06-15 17:43:41 -06:00
Seth House
9d1cc1a176 Add test to check that runners ignore invalid kwargs
I dunno if this is what we want long-term but this tests current
behavior.
2017-06-15 17:40:38 -06:00
rallytime
c828ad803a Add a bunch of config options to the various master/minion files that are missing
I started on these a while ago and never submitted them. I added a couple more today
and figured I should get these in.

Refs #32400
2017-06-15 16:21:47 -06:00
Mike Place
87e2e72d94 Merge pull request #41768 from rallytime/bp-41615
Manually back-port the changes in PR #41615
2017-06-15 15:41:44 -05:00
Daniel Wallace
733a2279ca npm 5.0.0 added a second line after fsevents
Remove that line from so we only get the json
2017-06-15 14:00:31 -06:00
Mike Place
36cb223ab2 Merge pull request #41740 from terminalmage/zd1532
Fix spurious error when glob/regex used in publisher_acl
2017-06-15 10:14:56 -05:00
Mike Place
126a36747b Merge pull request #41749 from terminalmage/parse_targets
Fix bug in pkg_resource.parse_targets when version passed
2017-06-15 10:05:52 -05:00
rallytime
b6cc0b6bf0 Manually backport the changes in PR #41615
The automatic back-porting process did't work for this file since the
testing file has been renamed. I manually added the changes to
`timezone_test.py` that were present in PR #41615.
2017-06-15 08:53:25 -06:00
Nicole Thomas
2c24012ded Merge pull request #41753 from rallytime/bp-41449
Back-port #41449 to 2016.11
2017-06-14 16:16:10 -06:00
Mike Place
e685858269 Merge pull request #41750 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-06-14 17:15:40 -05:00
C. R. Oldham
2e4a0633da Extend __proxy__ to jinja as proxy (like __salt__->salt) 2017-06-14 15:25:43 -06:00
Mike Place
36cc8f1e35 Merge pull request #41756 from Ch3LL/2016.11.6_release
Add Change Log to 2016.11.6 Release Notes
2017-06-14 15:57:07 -05:00
Ch3LL
fa368f21ac
Add Change Log to 2016.11.6 Release Notes 2017-06-14 16:00:50 -04:00
Sébastien Wains
fae41c2875 Adjusting SVN unit test 2017-06-14 13:40:50 -06:00
Sebastien
eac6b151eb Improved SVN output in test mode 2017-06-14 13:40:49 -06:00
rallytime
89834e49c2 Merge branch '2016.3' into '2016.11'
Conflicts:
  - conf/master
  - salt/utils/schedule.py
2017-06-14 13:24:11 -06:00
garethgreenaway
edcafc6a26 Merge pull request #41692 from rallytime/fix-40155
Add boto and boto3 version dependencies to boto_vpc state docs
2017-06-14 12:05:06 -07:00
Erik Johnson
698806fb09 No need to manually create pkg_params dict when name and version passed
This was an incorrect fix, the fix should have been made in
pkg_resource.parse_targets. Now that it is fixed there, this is not
needed.
2017-06-14 14:03:26 -05:00