Commit Graph

402 Commits

Author SHA1 Message Date
Steve Hajducko
cef6eff7c8 Catch ValueError on timeout on non-existing key
The etcd watch function tries to read a key when it reaches the timeout
in order to obtain details about the key.

On python 2.6, when it tries to re-read the key, it throws a ValueError,
since python-etcd doesn't officially support python 2.6.  The watch
function wasn't catching this ValueError, so it was returning the
exception, rather than a blank dict.
2015-12-01 10:30:45 -08:00
Bastiaan Bakker
7052479ad3 remove trailing whitespace
fix subdict_match test cases
2015-11-25 17:12:17 +01:00
Bastiaan Bakker
e3af8d2151 fix issue 29191: only try partial matches when a wildcard has been specified 2015-11-25 16:03:33 +01:00
Colton Myers
d76d62877d Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/modules/git.py
    salt/renderers/gpg.py
    salt/utils/__init__.py
2015-11-17 16:24:43 -07:00
Mike Place
5b680c938a Merge pull request #28950 from DSRCompany/pr/28812_which
PR 28812 which test fix
2015-11-17 08:32:16 -07:00
Dmitry Kuzmenko
18571000c5 Fix which test in PR#28812 2015-11-17 11:29:41 +03:00
Todd Tomkinson
ba94878f45 marathon and chronos proxy minions 2015-11-12 10:03:38 -07:00
Todd Tomkinson
f6ccc0e250 marathon and chronos proxy minions 2015-11-11 10:51:28 -07:00
Steve Hajducko
455f40b0d2 Refactor etcd modules
The etcd modules were using bits and pieces of python-etcd directly and
were using outdated exceptions to catch errors.  These errors were
causing issues when trying to use etcd modules for logic.

A summary of changes
    - Most of the 'work' is now done in etcd_util
    - Removed import of python-etcd from states/etcd_mod and the
      returner
    - Added new tests for etcd_util
    - Put in proper exceptions and catches for python-etcd
    - Added support for ValueError catching.  python-etcd doesn't
      support python 2.6 and raises ValueError when trying to format
      exceptions
    - Added watch function to etcd execution module
    - Added autospec to unit tests so hopefully less brittle
    - Added TTL and directory features to the set function

*BACKWARDS INCOMPATIBLE CHANGES*

All interfaces are still backwards incompatible.  However, the returns
from several of the etcd util functions have been changed.  The old
returns presented issues with certain test cases.  For instance, a
failed 'get' returned '', but a key with no value will also return ''.

The same issues occured with the 'ls', 'tree' and 'set' functions.  Trying to
ls a blank directory returned the same result as a failed ls of a
non-existent key.
2015-11-06 16:29:50 -08:00
rallytime
9ea33bf0e4 Pylint fixes 2015-10-16 07:22:46 -06:00
Domingo Kiser
4af5b5c33f introduce recurse_list pillar_source_merging_strategy 2015-10-16 05:24:40 -06:00
Mike Place
6d46a38d5d Whitespace lint
Refs #27891
2015-10-13 09:15:12 -06:00
Domingo Kiser
a8adaa8f9e introduce recurse_list pillar_source_merging_strategy 2015-10-12 21:59:39 -07:00
Colton Myers
69d960f8e6 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/man/salt.7
    doc/topics/ssh/index.rst
    salt/modules/boto_secgroup.py
    salt/modules/dockerng.py
    salt/states/archive.py
    salt/states/boto_elb.py
    salt/states/boto_secgroup.py
    tests/unit/modules/schedule_test.py
2015-10-07 13:11:48 -06:00
rallytime
78c85fbb31 Add unit tests for new recursive function 2015-09-29 21:25:47 -06:00
Pedro Algarvio
10a9189d83 Merge remote-tracking branch 'upstream/2015.8' into hotfix/merge-forward-develop 2015-09-06 12:42:58 +01:00
Pedro Algarvio
503e050a75 Sometimes the event system is just too fast 2015-09-04 15:52:06 +01:00
Pedro Algarvio
2f40387290 Add test_event_single_wait_0_no_block_False test case 2015-09-03 19:54:57 +01:00
Pedro Algarvio
ae9c6c9cff Workaround wait=0 meaning a blocking call when non blocking is required 2015-09-03 18:06:43 +01:00
Pedro Algarvio
dc0fec3be3 Restore backwards compatibility to salt.utils.event
Fixes #26848
Refs #26000
2015-09-03 11:11:58 +01:00
Colton Myers
278e8dda5b Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/gce.py
2015-09-01 15:15:13 -06:00
Erik Johnson
d30eaee653 Add http basic auth tests 2015-08-29 21:14:20 -05:00
Colton Myers
75f48b4a96 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/topics/targeting/grains.rst
2015-08-21 16:48:48 -06:00
Jenkins
f5131c2b46 More indent 2015-08-20 13:57:36 -06:00
Jenkins
52cde47aaf Fix failing event tests and modify event init
There was a problem wherein two sockets would race to see which was connected first,
causing unit.utils.event_test.TestSaltEvent.test_event_multiple_clients to fail from
time to time. This gives a little breathing room to the second socket.

This also only does the pub connect if necessary on SaltEvent instantation.
2015-08-20 13:41:07 -06:00
Colton Myers
73282d51cc Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cli/daemons.py
    salt/master.py
    salt/minion.py
    salt/modules/gpg.py
    salt/modules/pw_group.py
    salt/utils/http.py
    setup.py
    tests/unit/modules/schedule_test.py
2015-08-19 11:29:45 -06:00
Colton Myers
bf6c7e82cc Keep the formatted assertMsg 2015-08-18 12:50:24 -06:00
Mike Place
53d4739fa3 Merge pull request #26418 from driskell/fix_discarded_events_2015.8
Fix forward-merged caching from 2015.5 into 2015.8 to be compatible with the new match_func
2015-08-18 08:59:16 -06:00
Jason Woods
63b195987e Fix forward-merged caching from 2015.5 into 2015.8 to be compatible with the new match_func 2015-08-18 14:37:23 +01:00
Colton Myers
f3c8ba85dc Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/opennebula.py
    salt/modules/systemd.py
    salt/utils/aws.py
2015-08-17 17:06:59 -06:00
Thomas S Hatch
9d64b419d2 Merge pull request #26272 from garethgreenaway/schedule_list_show_jobs_enabled
Fixes to schedule module
2015-08-17 12:54:24 -06:00
Pedro Algarvio
a73ca74bc3 White-space lint fix 2015-08-17 15:28:22 +01:00
Pedro Algarvio
8f69530f65 Add the unit tests for Schema in a DictItem properties 2015-08-17 13:20:18 +01:00
Pedro Algarvio
fa826c9ba2 Add a validation test for DictItem required attribute validation 2015-08-17 13:58:22 +01:00
Pedro Algarvio
f74cc21d70 DictItem must also define it's require attribute 2015-08-17 13:56:00 +01:00
Pedro Algarvio
a0af17dbde Double to single quotes 2015-08-17 13:54:12 +01:00
Gareth J. Greenaway
ac36c3e979 Two more fixes to unit tests reflecting changes. 2015-08-13 10:53:37 -07:00
C. R. Oldham
7fc3232633 Merge 2015.8 forward to develop (get ldap fix) 2015-08-12 11:37:04 -06:00
Colton Myers
1c661abc91 Skip failing event tests
@driskell it would be great if you could fix these up when you do your
2015.8 refactor
2015-08-12 10:15:11 -06:00
Colton Myers
426b1631c6 Remove stray subscribe 2015-08-11 23:12:18 -06:00
Colton Myers
1502a39779 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    conf/minion
    salt/client/__init__.py
    salt/states/dockerio.py
    salt/utils/event.py
    tests/unit/utils/event_test.py
2015-08-11 18:12:21 -06:00
Mike Place
cfb6982227 Adding some dictupdate merge tests
Add new option for top_file_merging_strategy to config

Add master config file option

Adding additional tests

Lexicographical test works

Make default strategy

Simplify to just an option about whether or not to merge

Changes

Implement ordered top files

Implement merge strategies and default top files

Lint

Doc rewrite and start on ordering

Remove debugging

Moving to env_order

Adding env_order

Still writing tests

More tests and docs
2015-08-11 11:28:40 -06:00
Mike Place
13d544b675 Adding some dictupdate merge tests
Add new option for top_file_merging_strategy to config

Add master config file option

Adding additional tests

Lexicographical test works

Make default strategy

Simplify to just an option about whether or not to merge

Changes

Implement ordered top files

Implement merge strategies and default top files

Lint

Doc rewrite and start on ordering

Remove debugging

Moving to env_order

Adding env_order

Still writing tests

More tests and docs
2015-08-07 10:43:19 -06:00
Jason Woods
65acf975dd Implement full event caching for subscribed tags
Require all multitasking contexts to subscribe to their events so one call to get_event for one tag does not discard events that should be saved for a subsequent call to get_event with another tag.
Use blocking get_event in batching with very small timeout.
Fixes #25998
2015-08-05 11:58:32 +01:00
Dmitry Kuzmenko
5c6276ac7d Subscribe event to bus is optional now
Once subscribed to publisher SUB socket gets collecting all incoming
messages that is unwanted behavior for fire-only events.
Fixed by using listen=<True|False> constructor argument.
2015-08-03 16:10:38 -06:00
Colton Myers
abf389743a Merge pull request #25903 from basepi/merge-forward-develop
Merge forward from 2015.8 to develop
2015-08-03 11:12:18 -06:00
Pedro Algarvio
05165467e8 Allow schemas to override it's class attribute name 2015-07-31 22:42:43 +01:00
Pedro Algarvio
55918b7d50 Allow schema items to override it's class attribute name 2015-07-31 21:00:22 +01:00
Colton Myers
d8c5dfb33f Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop 2015-07-30 16:58:19 -06:00
Thomas Jackson
fb4cdc475f Keep track of SyncWrapper's IOLoop usage
While thinking through issues that might cause #25718 I ran into this case-- where you can create 2 sync wrappers with the same parent IOLoop and run into problems because you can't start/stop the loop multiple times like that and have the call tree work correctly. To solve this (since it *should* be the exceptional case) I'm making SyncWrapper keep track of which loops are in use-- then if someone attempts this situation it will simply make another one.
2015-07-29 08:48:33 -07:00