Commit Graph

82047 Commits

Author SHA1 Message Date
Sergey Kizunov
892c6d4d24 TCP transport: Fix occasional errors when using salt command
When using the `salt` command, errors would occasionally appear that
look like:

```
File "...\salt\transport\tcp.py", line 883, in _stream_return
AttributeError: 'NoneType' object has no attribute 'StreamClosedError'
```

Upon investigation, it was discovered that in this case,
`SaltMessageClient._stream_return()` was completed after all the modules
such as the one containing `tornado.iostream.StreamClosedError` were
unloaded, so at that time, that symbol evaluated to `None` instead of a
valid exception class.

Instead, we would expect `_stream_return` to be completed at the time
that `SaltMessageClient.close()` is invoked. It was noted that
`_stream_return` was not completed when using the `SyncWrapper`, since
that object turns off the IO Loop immediately when its own future
completes, so that the IO Loop is not running when
`SaltMessageClient.close()` is invoked which doesn't give `_stream_return`
a chance to complete. Even when the IO Loop is closed in
`SyncWrapper.__del__()`, `_stream_return` is not completed. In this case,
it only seems to complete when the Python application shuts down which
is when the error appears.

Fix this issue by allowing the IO Loop to run again until the completion
of a specially created future that completes when `_stream_return` is
exiting.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-05-31 18:30:18 -05:00
Sean Jenkins
095e5949a3 Fix unit tests for PR #41509 2017-05-31 17:22:07 -06:00
Sean Jenkins
eb7ef3c856 Add keystone V3 API support for keystone.endpoint_present|get, endpoint_absent|delete.
Passing interface to endpoint_present, or absent, will ensure only the given interface
for specified the specified region, is acted upon.

Fixes #41435
2017-05-31 17:22:07 -06:00
Daniel Wallace
0989be8919 allow digest to be empty in create_crl 2017-05-31 16:48:54 -06:00
rallytime
63ea033ec3 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/win_status.py
  - salt/states/selinux.py
  - tests/unit/modules/test_ssh.py
2017-05-31 14:29:12 -06:00
Mike Place
06ed4f077b Merge pull request #41337 from Foxlik/2016.11
Fix #41335 - list index out of range on empty line in authorized_keys
2017-05-31 14:59:16 -05:00
Mike Place
1ace72d871 Merge pull request #41512 from twangboy/fix_win_status
Use psutil where possible in win_status.py
2017-05-31 14:55:59 -05:00
Mike Place
232a25707e Merge pull request #41494 from cloudflare/bgp-runner-enhancement
Enhance BGP runner
2017-05-31 14:54:31 -05:00
Mike Place
683cc5f414 Merge pull request #41490 from jdsieci/2016.11_selinux
Backport of SELinux module installation and removal
2017-05-31 14:37:59 -05:00
peter-funktionIT
d146fd029c Update win_pki.py
Removed whitespaces on empty line
2017-05-31 21:11:30 +02:00
wasabi222
1421c820f6 add version changed to nitrogen 2017-05-31 14:51:55 -04:00
wasabi222
95b57014a4 change default skip_verify to False 2017-05-31 14:43:32 -04:00
twangboy
582d09b484 Get psutil import 2017-05-31 11:03:07 -06:00
twangboy
0557acae07 Fix some more lint 2017-05-31 10:39:48 -06:00
wasabi222
59e58fee9b default skip_verify to False 2017-05-31 12:27:36 -04:00
Mike Place
9480edd5bb Merge pull request #41514 from rallytime/fix-41410
Fix the EC2 salt-cloud driver to work with Python 3
2017-05-31 10:56:49 -05:00
Mike Place
2e7e84b8f2 Merge pull request #41522 from jettero/mongodb-keys-are-stupid
Sadly, you can't have '.'s and '$'s in dict keys in a mongodb doc.
2017-05-31 10:55:23 -05:00
Paul Miller
12648f5439 dang, thought I already got that. Apparently only got the bottom one. This should do it. 2017-05-31 10:16:22 -04:00
Paul Miller
7c4a763518 ugh, forgot about this lint too. This one looks especially terrible. 2017-05-31 09:38:46 -04:00
Paul Miller
c973988d8d forgot about the linter pass … fixed 2017-05-31 09:06:59 -04:00
Paul Miller
da0d9e4045 Sadly, you can't have '.'s and '$'s in dict keys in a mongodb doc. 2017-05-31 08:10:54 -04:00
Tomas Zvala
916fecb64f modify ssh_test.py, to check empty lines and comments in authorized_keys #41335 2017-05-31 10:56:02 +02:00
twangboy
1909e39044 Fix makedirs_ function
- Call to mkdir was using the wrong variable
- Added error handling, raise erros on failure
2017-05-30 20:47:54 -06:00
Nicole Thomas
8849884307 Merge pull request #41496 from cloudflare/net-finder-fix
Various fixes for the net runner
2017-05-30 18:50:07 -06:00
Nicole Thomas
30ad4fd9a0 Merge pull request #41506 from gtmanfred/2016.11
check for integer types
2017-05-30 18:48:21 -06:00
rallytime
29702a3397 Fix the EC2 salt-cloud driver to work with Python 3
Fixes #41410
2017-05-30 18:31:17 -06:00
twangboy
fd88bb277f Remove unused imports (lint) 2017-05-30 16:02:38 -06:00
twangboy
41a39dff00 Use psutil where possible 2017-05-30 15:51:55 -06:00
Daniel Wallace
5fe2e9bbf5 check for integer types
This will check for int and long in py2 and int in py3
2017-05-30 14:14:54 -06:00
Mike Place
713a671f09 Merge pull request #41471 from terminalmage/blockreplace-test
Fix a file.blockreplace test for Python 3
2017-05-30 13:48:22 -05:00
Mike Place
06ef17dec3 Merge pull request #41469 from Ch3LL/fix_redis_error
Fix keep_jobs keyerror in redis returner
2017-05-30 13:37:42 -05:00
Mike Place
7a09b2b678 Merge pull request #41473 from twangboy/fix_win_firewall
Fix win_firewall execution and state modules
2017-05-30 13:35:23 -05:00
Nicole Thomas
55d5e6c6fe Merge pull request #41500 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-05-30 12:06:35 -06:00
Nicole Thomas
f635cb11c4 Merge pull request #41499 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-05-30 12:06:02 -06:00
rallytime
675937e0ab Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - tests/unit/states/test_keystone.py
2017-05-30 10:16:14 -06:00
rallytime
20d893d397 Merge branch '2016.3' into '2016.11'
No conflicts.
2017-05-30 10:14:44 -06:00
Mike Place
4b160ab3df Merge pull request #41419 from terminalmage/issue39986
Add --no-parse CLI option to salt, salt-call, salt-run, and salt-ssh
2017-05-30 10:55:54 -05:00
Nicole Thomas
f7411393e4 Merge pull request #41495 from isbm/bp-41405
Takeover from "rallytime:bp-41405"
2017-05-30 09:11:43 -06:00
Mircea Ulinic
418c5c2624 More documentation improvements 2017-05-30 12:17:37 +00:00
Mircea Ulinic
e0f8537bfe Runners doc cross-reference 2017-05-30 12:15:51 +00:00
Mircea Ulinic
53a90c8842 Complete neighbors function doc ref 2017-05-30 12:12:48 +00:00
Mircea Ulinic
c21f701f37 tgt instead of target and tgt_type instead of expr_form 2017-05-30 12:09:58 +00:00
Mircea Ulinic
6008d2d010 Add VRF optional field 2017-05-30 12:06:07 +00:00
Mircea Ulinic
21c2b8b269 Various fixes for the net runner
Mostly documentation fixes, for better display
under the Salt docs.
Fix: the net.interfaces function couldn't be called
directly from the CLI due to a bug with the ipnet argument.
2017-05-30 11:47:33 +00:00
Mircea Ulinic
488a3b48a5 Enhance BGP runner
Insert interface_name and interface_description options.
Reuses the functionality from the net.interfaces runner
and matches the neighbor IP to determine the network interface
and return the interface description & interface name fields.
This field is not enable by default, as the users require to configure
few other mines, as documented in the net runner.
In the master configuration opts, they need to append the additional
interface_description and/or interface_name options under `return_fields`.
2017-05-30 11:40:09 +00:00
Bo Maryniuk
50ccc31cf6 Add missing import of fnmatch (lintfix) 2017-05-30 13:28:05 +02:00
Benjamin Drung
d3ce7bf05f Fix pkgrepo.managed always return changes for test=true
You can write a pkgrepo.managed state that contains components as comma
separated list (as specified in the documentation):

my-repository:
  pkgrepo.managed:
    - name: deb [arch=amd64] http://example.com/ stretch main non-free
    - dist: stretch
    - architectures: amd64
    - comps: main,non-free
    - file: /etc/apt/sources.list.d/example.list
    - clean_file: True

When running the state with test=true, salt will always tell that the
state would change the configuration. pkg.get_repo returns comps as
list, but pkgrepo.managed compares this list against the comma-separated
comps from kwargs (which will always be not equal).

Thus convert the comma-separated comps to a list in pkg.expand_repo_def
to compare two lists in pkgrepo.managed.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-29 11:27:22 +02:00
Benjamin Drung
1592687294 Document aptpkg architectures parameter
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-29 11:27:22 +02:00
twangboy
e503b455c3 Fix lint error 2017-05-26 17:11:41 -06:00
twangboy
d3f0f8bcd2 Fix win_firewall execution and state modules
- Vastly improved documentation
- Raise exception on command failure
- Check retcode instead of checking for 'Ok.'
- Fix problem with errors showing up in the log
- Created rule_exists function
2017-05-26 16:30:44 -06:00