Commit Graph

36573 Commits

Author SHA1 Message Date
Thomas Jackson
c4af0fcef1 More dict cleanup
keys() and values() create copies of the data in lists, iterators are better
2014-11-03 15:51:11 -08:00
Thomas Jackson
d81bca7aa7 More dict cleanup
keys() and values() create copies of the data in lists, iterators are better
2014-11-03 15:51:11 -08:00
Thomas Jackson
52d0df376f Redundant check
sorted(dict) == sorted(dict.keys())
2014-11-03 15:51:11 -08:00
Thomas Jackson
5930bbdaae Utils/wheel cleanup of dicts 2014-11-03 15:51:10 -08:00
Thomas Jackson
2bb27d3d4b More dict cleanup in state/states 2014-11-03 15:51:10 -08:00
Thomas Jackson
8e02c08a92 keys() cleanup in returners 2014-11-03 15:51:10 -08:00
Thomas Jackson
7821b2d390 Keys() cleanup in renderers 2014-11-03 15:51:10 -08:00
Thomas Jackson
1615c0f394 Cleanup pillar modules with dicts 2014-11-03 15:51:10 -08:00
Thomas Jackson
d686479f54 more cleanup
no need to caste keys() to a list since it returns a list
2014-11-03 15:51:10 -08:00
Thomas Jackson
1ef0b85ff5 Remove redundant keys() since dict is an iterator of keys 2014-11-03 15:51:10 -08:00
Thomas Jackson
1d4444d2f7 More dict cleanup 2014-11-03 15:51:10 -08:00
Thomas Jackson
847659b424 more dict cleanup 2014-11-03 15:51:10 -08:00
Thomas Jackson
6f3f3226b9 More keys() removal 2014-11-03 15:51:10 -08:00
Thomas Jackson
fbc14beb97 No need to create a copy of the keys 2014-11-03 15:51:10 -08:00
Thomas Jackson
3d871c97c2 No reason to create a copy of the dict in memory, we can just get the key from the key iterator 2014-11-03 15:50:55 -08:00
Thomas Jackson
152154df57 Don't need keys() dicts are iterators of their keys 2014-11-03 15:50:54 -08:00
Thomas Jackson
27b5bbe1c1 Dicts are already iterators over their keys 2014-11-03 15:50:54 -08:00
Thomas S Hatch
0bbe01b2f0 Merge pull request #16937 from terminalmage/issue16285
Force VCS fileserver backend config values to be loaded as strings
2014-11-03 16:30:40 -07:00
rallytime
92fc46607f Don't use HVM image type. 2014-11-03 16:12:21 -07:00
Thomas Jackson
896a2cc7de Pylint cleanup 2014-11-03 14:41:36 -08:00
rallytime
e272c41bb8 Use Ubuntu 14 image for ec2 cloud tests instead of RHEL 6 2014-11-03 15:13:14 -07:00
Thomas Jackson
35b110fc69 Fix for an issue where re-started sub-processes would inherit the signal handlers from the process manager. Then you would end up with stack traces like:
```
Process Publisher-6:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
  File "/home/thjackso/src/salt-github/salt/master.py", line 403, in run
    package = pull_sock.recv()
  File "socket.pyx", line 628, in zmq.backend.cython.socket.Socket.recv (zmq/backend/cython/socket.c:5616)
  File "socket.pyx", line 662, in zmq.backend.cython.socket.Socket.recv (zmq/backend/cython/socket.c:5436)
  File "socket.pyx", line 139, in zmq.backend.cython.socket._recv_copy (zmq/backend/cython/socket.c:1771)
  File "checkrc.pxd", line 11, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:5863)
  File "/home/thjackso/src/salt-github/salt/utils/process.py", line 242, in kill_children
    p_map['Process'].join(0)
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 117, in join
    assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process
```
2014-11-03 13:53:13 -08:00
Thomas S Hatch
072ec7997f Merge pull request #16393 from s0undt3ch/features/ssh-packaging
READ BEFORE MERGE
2014-11-03 14:47:39 -07:00
Mike Place
c9e01801b1 Simplify decoding 2014-11-03 11:41:17 -07:00
Ryan Davis
480ee850ef only sleep after sc reports we're still waiting
In testing, sometimes `net stop` might not stop the service, but
checking the service using `sc query` immediately afterwards reported
the service as stopped (I suspect a process scheduling issue, but have
no real evidence of that).

Changes the logic to check using `sc query` and then sleep only if we're
not stopped (as opposed to sleep, then check using `sc query`).

This results in a few different execution paths:

* `net stop` works, we exit
* `net stop` fails, `sc query` reports the service is stopped, we exit
* `net stop` fails, `sc query` reports the service is NOT stopped, we
  sleep then check again

This approach should have us sleeping only if we really need to.
2014-11-03 08:39:59 -05:00
Ryan Davis
0afbe2cdf6 pep8 2014-11-03 08:39:46 -05:00
avdhoot
265e5c558c Fix #16085 pam auth module was not closeing PamHandle. moreinfo: http://pubs.opengroup.org/onlinepubs/8329799/pam_end.htm 2014-11-03 15:54:41 +05:30
Pedro Algarvio
58f3575fce Merge pull request #17084 from terminalmage/docs
Update RC version in docs sidebar
2014-11-02 09:08:24 +00:00
Erik Johnson
dfc10ef9b6 Update RC version in docs sidebar 2014-10-31 19:34:03 -06:00
Thomas S Hatch
3e2b366cd6 Merge pull request #17081 from lyft/fix-state-verbose
Fix state_verbose: False output
2014-10-31 15:47:40 -06:00
Thomas S Hatch
1f1f2193fb Merge pull request #17064 from opdude/hg-quotations
Quotations are not necessary when passing cmd arguments in as an array
2014-10-31 15:37:39 -06:00
Thomas S Hatch
15a51935fa Merge pull request #17073 from jfindlay/jmoney/linux_sysctl_test
Jmoney/linux_sysctl_test
2014-10-31 15:25:35 -06:00
Ryan Lane
53d8304b15 Fix state_verbose: False output 2014-10-31 14:08:20 -07:00
Justin Findlay
26094b39b4 pylint fix on linux_sysctl_test.py 2014-10-31 12:41:04 -06:00
Justin Findlay
f09b8e3873 remove redundant mock_open() in darwin_sysctl_test.py 2014-10-31 10:42:57 -06:00
Justin Findlay
31f2dbaa91 change linux_sysctl.py to fail properly on misassign
The original check (4e1c367) for sysctl assign failure queries the
format returned by sysctl on stdout.  It was added evidently for some
container system called Virtuozzo.  A later commit (4e1c367) strengthens
the check into a full regex on sysctl stdout.

Unfortunately, it appears that on a contemporary conventional distro,
CentOS 7, sysctl repeats the config it is given on stdout whether or not
the config requested is valid.  Furthermore, an invalid config request
will not cause sysctl to return a nonzero status.  It does print an
error on stderr, so I've added an optional additional check of stderr.
Examples:

centos-7 # sysctl net.ipv4.ip_forward=1 ; echo $?
net.ipv4.ip_forward = 1
0

centos-7 # sysctl net.ipv4.ip_forward=backward ; echo $?
sysctl: setting key "net.ipv4.ip_forward": Invalid argument
net.ipv4.ip_forward = backward
0
2014-10-31 10:25:24 -06:00
Justin Findlay
106f645c9e adding tests for modules/linux_sysctl.py 2014-10-31 10:16:41 -06:00
Nicole Thomas
573390d8ad Merge pull request #17054 from jacksontj/2014.7
Fix for #17051
2014-10-31 10:14:16 -06:00
Nicole Thomas
febd925453 Merge pull request #17069 from cachedout/issue_17055
Fix failing tests
2014-10-31 09:16:55 -06:00
Mike Place
a0a0512cf5 Fix failing tests 2014-10-31 08:35:23 -06:00
Ryan Davis
eab9ac3eca account for stop failures when restarting services
During restarts, only try to start the service if it successfully
stopped
2014-10-31 10:18:44 -04:00
Ryan Davis
86ff5520e4 log when we stop waiting for a service to stop
Leave some evidence of the failure for the ops folks.
2014-10-31 10:16:11 -04:00
Daniel Hobley
3edf142290 Quotations are not necessary when passing cmd arguments in as an array
- This also fixes the inability to clone mercurial repos on Ubuntu 12.04
2014-10-31 13:49:13 +01:00
Pedro Algarvio
8e00178a88 Merge pull request #17049 from terminalmage/quickfix
Fix nonsense language in error message
2014-10-31 04:13:26 +00:00
C. R. Oldham
d44a4739c7 Merge pull request #17059 from cro/nssm_update
Update nssm to latest 2.24 (2014-08-31 release)
2014-10-30 22:16:47 -04:00
C. R. Oldham
6c9be002c5 Update nssm to 2.24 2014-10-30 22:15:26 -04:00
Thomas Jackson
6262d44d50 Add "normalize_ret" function, so we don't have to copy/paste so much
Add checks for "changes" since we want to test cases where there aren't changes to be made
2014-10-30 16:58:03 -07:00
Thomas Jackson
d2b548a0e7 Add regression test for #17051 2014-10-30 16:43:06 -07:00
Thomas Jackson
5cf110b80c Fix for #17051 2014-10-30 16:03:00 -07:00
Colton Myers
2fec4d01d6 Merge pull request #17048 from terminalmage/osxdestkop-virtual
Use salt.utils.is_darwin() for __virtual__ in osxdesktop module
2014-10-30 16:17:55 -06:00