Commit Graph

23 Commits (dbb0ef40c09f4abc653664f3f493f758bfde713f)

Author SHA1 Message Date
James Cammarata b71957d6e6 Move queuing tasks to a background thread 8 years ago
James Cammarata c669a381d1 Don't immediately return failed for any_errors_fatal tasks
Instead of immediately returning a failed code (indicating a break in
the play execution), we internally 'or' that failure code with the result
(now an integer flag instead of a boolean) so that we can properly handle
the rescue/always portions of blocks and still remember that the break
condition was hit.

Fixes #16937
8 years ago
James Cammarata d2b3b2c03e Performance improvements 8 years ago
jctanner 238c6461f6 Add a function to check for killed processes in all strategies (#16684)
* Add a function to check for killed processes so that if any
threads are sigkilled or sigtermed, the entire playbook execution is aborted.
8 years ago
James Cammarata 221520cbad Fixing type in 293723f (mock_handler -> mock_handler_task) 8 years ago
James Cammarata 0ea2b2a6af Fix unit test for base strategy in regards to handler changes 8 years ago
James Cammarata ca6ee4c789 FEATURE: handler listeners
Fixes ansible/proposals#8
8 years ago
James Cammarata 8218591fec Track notified handlers by object rather than simply their name
Due to the fact that roles may be instantiated with different sets of
params (multiple inclusions of the same role or via role dependencies),
simply tracking notified handlers by name does not work. This patch
changes the way we track handler notifications by using the handler
object itself instead of just the name, allowing for multiple internal
instances. Normally this would be bad, but we also modify the way we
search for handlers by first looking at the notifying tasks dependency
chain (ensuring that roles find their own handlers first) and then at
the main list of handlers, using the first match it finds.

This patch also modifies the way we setup the internal list of handlers,
which should allow us to correctly identify if a notified handler exists
more easily.

Fixes #15084
8 years ago
James Cammarata fbec2d9692 Expand return code values returned by TQM and strategies
This allows the PlaybookExecutor to receive more information regarding
what happened internal to the TaskQueueManager and strategy, to determine
things like whether or not the play iteration should stop.

Fixes #15523
8 years ago
Brian Coca 27f4730c29 correctly deals with non serializable type
combine_vars shoudl really be data types, but some just get in
in test, add dict to mock and avoid combine_vars using object
9 years ago
James Cammarata d7f2f606e1 Add has_hostkey to mock objects to fix broken unit tests 9 years ago
James Cammarata 6109f70397 Attempt at fixing strategy unit test failures on py2.6 and py3 9 years ago
James Cammarata 279c5a3596 Cleanup strategy tests broken by new forking strategy 9 years ago
Brian Coca b6d6c2e4db corrected all missing paths changes 9 years ago
James Cammarata 8146a193eb Fix strategy base unit tests after 88e1ef8 9 years ago
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
9 years ago
James Cammarata fadd8f23f1 Fix broken strategy unit test from earlier change 9 years ago
James Cammarata 3b913943b2 Updating base strategy unit test regarding bad file loads based on earlier change 9 years ago
James Cammarata bfbb88b4a9 Fix strategy plugin unit tests related to earlier changes 9 years ago
Matt Martz 49d19e82ab Get tests passing
The largest failure in the tests was due to selinux not being installed.
The tests don't require it to be installed, so mock the import.
9 years ago
James Cammarata 0828028c71 Fixing unit test for included file changes 9 years ago
James Cammarata 9921a1d2be Unit tests for base strategy class (v2) 9 years ago
James Cammarata 21fa385ce7 Reorganizing plugin unit tests and adding start of strategy tests (v2) 9 years ago