Commit Graph
100 Commits
Author SHA1 Message Date
chris meyers 676c068b71 add job_description to failed workflow node
* When workflow job fails because a workflow job node doesn't have a
related unified_job_template note that with an error on the workflow
job's job_description
* When a workflow job fails because a failure path isn't defined, note
that on the workflow job job_description
2018-11-27 16:12:41 -05:00
chris meyers 00d71cea50 detect workflow nodes without job templates
* Fail workflow job run when encountering a Workflow Job Nodes with
no related job templates.
2018-11-27 16:12:41 -05:00
chris meyers 281345dd67 flake8 fix 2018-11-27 16:12:41 -05:00
chris meyers 1a85fcd2d5 update docs to include workflow failure semantic 2018-11-27 16:12:41 -05:00
chris meyers c1171fe4ff treat canceled nodes as failed when processing wf
* When deciding what jobs to run next, treat canceled as failed.
* Also add tests.
2018-11-27 16:12:41 -05:00
chris meyers d6a8ad0b33 treat canceled jobs in wf the same as failed jobs
* Also fix spelling mistake that caused workflows to be falsely marked
successful in the case of a canceled job.
2018-11-27 16:12:41 -05:00
chris meyers 266831e26d add cycle unit test 2018-11-27 16:12:41 -05:00
chris meyers a6e20eeaaa update wf done and failed tests 2018-11-27 16:12:41 -05:00
chris meyers 6529c1bb46 update done and fail detection for workflow
* Instead of traversing the workflow graph to determine if a workflow is
done or has failed; instead, loop through all the nodes in the graph and
grab only the relevant nodes.
2018-11-27 16:12:41 -05:00
chris meyers b81d795c00 fix up dot graph generator
* Update graph dot generator to use the new efficient graph
2018-11-27 16:12:41 -05:00
chris meyers 1b87e11d8f flake8 2018-11-27 16:12:41 -05:00
chris meyers 8bb9cfd62a add dag tests 2018-11-27 16:12:41 -05:00
chris meyers a176a4b8cf remove unused code 2018-11-27 16:12:41 -05:00
chris meyers 3f4d14e48d crawl entire graph when marking DNR
* From the root, the code was only going down the did run path to find
nodes to mark DNR. This is incorrect, Now, we traverse the entire graph
each time to find nodes to mark DNR.
2018-11-27 16:12:41 -05:00
chris meyers 0499d419c3 more efficient graph processing
* Getting parent nodes from child was inefficient. Optimize it with a
hash table like we did for the getting of children.
* Getting leaf nodes was inefficient. Optimize it like we did getting
root nodes. A node is assumed to be a leaf node until it gets a child.
2018-11-27 16:12:41 -05:00
chris meyers 3dadeb3037 remove print statements 2018-11-27 16:12:41 -05:00
chris meyers 16a60412cf optimization fix
* WorkflowDAG accepts workflow job template and workflow jobs for which
to build a graph out of the nodes. The optimized query for each is
different. This changeset adds the differing queries for a workflow job.
2018-11-27 16:12:41 -05:00
chris meyers 9f3e272665 optimize cycle detection 2018-11-27 16:12:41 -05:00
chris meyers e1e8d3b372 bump migration 2018-11-27 16:12:40 -05:00
chris meyers 07db7a41b3 more flake8 2018-11-27 16:12:40 -05:00
chris meyers 1120f8b1e1 try2 at the devil flake8 2018-11-27 16:12:40 -05:00
chris meyers 17b3996568 fix flake8 anyway I can 2018-11-27 16:12:40 -05:00
chris meyers 584b3f4e3d remove workflow test
* We now handle workflows with jobs that have errored. We treat them the
same as a failure result. Before, we would abort the workflow when we
encountered an error.
2018-11-27 16:12:40 -05:00
chris meyers f8c53f4933 handle job error state in convergence 2018-11-27 16:12:40 -05:00
chris meyers 6e40e9c856 handle edge case ring cycle 2018-11-27 16:12:40 -05:00
chris meyers 2f9dc4d075 remove relationship in view if cycle detected 2018-11-27 16:12:40 -05:00
chris meyers 9afc38b714 fixup migrations 2018-11-27 16:12:40 -05:00
chris meyers dfccc9e07d rework wf cycle detection for convergence 2018-11-27 16:12:40 -05:00
chris meyers 7b22d1b874 cycle detection when multiple parents 2018-11-27 16:12:40 -05:00
chris meyers 1e10d4323f update docs 2018-11-27 16:12:40 -05:00
chris meyers 4111e53113 correctly name migration to align with 3.4.0 2018-11-27 16:12:40 -05:00
chris meyers 02df0c29e9 merge artifacts deterministically 2018-11-27 16:12:40 -05:00
chris meyers 475c90fd00 prevent job launching twice 2018-11-27 16:12:40 -05:00
chris meyers 2742b00a65 flake8 2018-11-27 16:12:40 -05:00
chris meyers ea29e66a41 fix workflow finish state detector
* Take into account the new do_not_run field when finding if a workflow
is finished. If do_not_run is True then the node is considered finished.
2018-11-27 16:12:40 -05:00
chris meyers 6ef6b649e8 cleaner code 2018-11-27 16:12:40 -05:00
chris meyers 9bf2a49e0f save state 2018-11-27 16:12:40 -05:00
chris meyers 914892c3ac all parents should finish before start child 2018-11-27 16:12:40 -05:00
chris meyers 77661c6032 short circuit performance optimization 2018-11-27 16:12:40 -05:00
chris meyers b4fc585495 stop DNR propogation on always path
* This makes sure DNR propogation stops when a job is successful, down
an always path
2018-11-27 16:12:40 -05:00
chris meyers ff6db37a95 correct stop DNR propogation
* If a child has a parent that is not in the finished state then do not
propogate the DNR to the child in question.
* If a parent is in a finished state; do not propogate the DNR to the
child if the path to the child is traversed (based on the parent job
status).
2018-11-27 16:12:40 -05:00
chris meyers 1a064bdc59 satisfy flake8 2018-11-27 16:12:40 -05:00
chris meyers ebabec0dad always find and mark dnr nodes 2018-11-27 16:12:40 -05:00
chris meyers 3506b9a7d8 Revert "mark dnr field read only"
This reverts commit 3dbc52d91223167683fd01174222bd6c22813dbd.

Workflow Job Nodes are read only already
2018-11-27 16:12:40 -05:00
chris meyers cc374ca705 update debug dot graph to output dnr data 2018-11-27 16:12:40 -05:00
chris meyers ad56a27cc0 mark dnr field read only 2018-11-27 16:12:40 -05:00
chris meyers 779e1a34db remove dnr field from jt wf node 2018-11-27 16:12:40 -05:00
chris meyers 447dfbb64d only visit nodes once for dnr 2018-11-27 16:12:40 -05:00
chris meyers a9365a3967 code cleanup 2018-11-27 16:12:40 -05:00
chris meyers f5c10f99b0 support workflow convergence nodes
* remove convergence restriction in API
* change task manager logic to be aware of and support convergence nodes
2018-11-27 16:12:40 -05:00
chris meyers 23e1feba96 fill in summary inv for sched only when needed
* If scheduler inv exists then the inv summary will be filled in with
our generic summary filler inner. Else, if the related unified job has
an inventory, fill in the inv summary with that, explicitly.
2018-11-08 12:43:47 -05:00
chris meyers f37391397e add inventory to schedule summary fields
* Use the same logic that related inventory uses. If there is an
inventory that overrides the inventory on the unified job  template then
summarize that field. Else, use the inventory on the unified job template
being scheduled.
2018-11-08 11:47:31 -05:00
chris meyers 906eb98d8e fixes dispatcher test that inadvertently access db
* Logger inadvertently triggered by dispatcher tests that do not need DB
access. Mock settings to sidestep DB access.
2018-10-16 11:30:04 -04:00
chris meyers 2e98446394 fix issue with ldap queries containing unicode 2018-10-12 10:33:01 -04:00
chris meyers cfb58eb145 fix issue with ldap queries containing unicode 2018-10-10 12:32:27 -04:00
chris meyers 0a0cdc2e21 at migration time, validate ldap group type params
* Previously, we have logic in the API to ensure that ldap group type
params, when changed, align with ldap group type Class init
expectations. However, we did not have this logic in the migrations.
This PR adds the validation check to migrations.
2018-09-27 12:18:39 -04:00
chris meyers f82f4a9993 deprecate fact endpoints and commands 2018-09-07 17:46:33 -04:00
chris meyers c7c9620f03 vary the pk 2018-08-09 17:53:31 -04:00
chris meyers 45f2fe7f90 add test for first net cred ssh password protected wins 2018-08-09 17:53:23 -04:00
chris meyers 3960a72c8a first net password-protected ssh key wins 2018-08-09 17:53:13 -04:00
chris meyers bc2b2214a8 add test for ssh over network ssh key password preference 2018-08-09 17:53:06 -04:00
chris meyers 3c2b18a965 add pexpect test for net cred 2018-08-09 17:52:55 -04:00
chris meyers f5aed74503 fill in network ssh password protected keys 2018-08-09 17:52:45 -04:00
chris meyers 5bfe9bf228 vary the pk 2018-08-09 15:44:59 -04:00
chris meyers 40d6c763b3 add test for first net cred ssh password protected wins 2018-08-09 13:32:42 -04:00
chris meyers 2f49dc774a first net password-protected ssh key wins 2018-08-09 13:25:15 -04:00
chris meyers 8d440acb0f add test for ssh over network ssh key password preference 2018-08-09 12:51:40 -04:00
chris meyers 9a199b99ac add pexpect test for net cred 2018-08-09 12:40:37 -04:00
chris meyers 48a0038f53 fill in network ssh password protected keys 2018-08-09 12:15:27 -04:00
chris meyers 5f85a08325 fix saml_admin_attr 2018-07-23 12:53:18 -04:00
chris meyers 3fcd1575c1 fix saml_admin_attr 2018-07-23 10:08:18 -04:00
chris meyers 7d24566120 more robustness 2018-07-20 15:02:44 -04:00
chris meyers 19e865e9a5 prevent remove iso instance from iso instance groups 2018-07-06 15:34:26 -04:00
chris meyers 2ffc4b256d fix copy paste error 2018-07-06 15:12:57 -04:00
chris meyers aeca21ab5b deny topology changes to iso instances via api 2018-07-06 14:50:17 -04:00
chris meyers 1359208a99 fix celery task reaper
* celery workers have internal queue names that are named after the
system hostname. This may differ from what tower knows the host by,
Instance.hostname
This adds a mapping so we can convert internal celery names to Instance
names for purposes of reaping jobs.
2018-06-15 16:56:53 -04:00
chris meyers 987063e7fd iso nodes do not have celery. that is ok 2018-06-11 15:38:41 -04:00
chris meyers fb11967114 remove isolated instance group queue listening 2018-06-08 13:46:58 -04:00
chris meyers 1cea20092c remove rampart group queue subscription
* We now target Instances in the task manager when transitioning jobs
from pending to waiting; whereas before we submitted jobs to Instance
Groups to be picked up by Instance's in those Instance Groups.
Subscribing Instances to their Instance Groups is no longer needed. This
change removes the Instance Group queue subscription.
2018-06-08 11:20:54 -04:00
chris meyers 0702692ca9 add controller_node to adhoc command job 2018-06-06 16:28:28 -04:00
chris meyers 74155dfc9d add system jobs to controller_node exceptions 2018-06-06 15:04:41 -04:00
chris meyers 8ee4b9680c remove controller_node field from jobs that don't apply 2018-06-06 11:26:15 -04:00
chris meyers b876c2af62 add total job count for instance + instance group 2018-06-05 12:05:22 -04:00
chris meyers 7b0b4f562d get isolated execution at the point its needed
* Instead of passing around the isolated host that the task is to
execute on; grab the isolated execution host from the instance further
down the call stack. Without passing the isolated hostname around.
2018-06-04 10:06:59 -04:00
chris meyers b94cf379f6 do not choose offline instances 2018-06-04 10:06:59 -04:00
chris meyers 9d732cdbdf update unit and functional tests 2018-06-04 10:06:59 -04:00
chris meyers 9863fe71dc do not require privileged iso container
* The init call w/ privileged was causing my laptop to wig out. This
changeset still functions w/ out requiring privileged access.
2018-06-04 10:06:59 -04:00
chris meyers 8d352a4edf conform isolated system to new early node choice
* Randomly chose an instance in the controller instance group for which
to control the isolated node run. Note the chosen instance via a job
controller_node field
2018-06-04 10:06:59 -04:00
chris meyers e720fe5dd0 decide the node a job will run early
* Deciding the Instance that a Job runs on at celery task run-time makes
it hard to evenly distribute tasks among Instnaces. Instead, the task
manager will look at the world of running jobs and choose an instance
node to run on; applying a deterministic job distribution algo.
2018-06-04 10:06:59 -04:00
chris meyers 4da68564ef do not cache dependency_list
* This is probably causing some bug. Calls to start_task within the same
run of the task manager could result in previous dependency lists being
used.
2018-05-29 10:27:51 -04:00
chris meyers 4031c888de fork process may finish before cancel callback
* The "should we cancel?" callback check is only called while the
subprocess (child) is alive. If the child executes quickly, the cancel
callback has no chance to run.
* call a subprocess that takes longer to run like sleep 2
2018-05-17 14:39:57 -04:00
chris meyers d8615df47f postgres back tests can't do this 2018-05-17 14:39:57 -04:00
chris meyers 88bb98c967 flake8 2018-05-17 13:38:37 -04:00
chris meyers 40ef30a914 reduce chance of collision on cache namespace 2018-05-17 13:37:04 -04:00
chris meyers 04767641af isolate cache 2018-05-17 12:58:11 -04:00
chris meyers 97ab6449b9 parallelize test running 2018-05-16 14:29:15 -04:00
chris meyers ceedc135b2 add variables to inventory mentioned in docs
* Also better error message when openshift cert failure
2018-05-15 14:44:43 -04:00
chris meyers 4761e17566 disabled instance stay subscribed to bcast queue
* A disabled node needs to stay subscribed to the broadcast queue
because the work to re-subscribe the node to queues when the node is
re-enabled is done over the broadcast queue.
2018-05-09 17:03:26 -04:00
chris meyers 5668d215fd better cluster membership policy log messages 2018-05-03 11:44:46 -04:00
chris meyers 9f745dd3b8 control celery routes using celery router
* Each time a route is needed (i.e. when a task is sumitted to celery).
The router will be queried. This is ideal. With the previous method we
had to consider how a change in the routes would propogate to all celery
workers and nodes.

* fully describe the default awx queue
* Our dynamic queue registration would correct awx_private_queue.
However, we don't want celery to even create an "invalid"/extra
queue-exchange-route. This change makes sure we don't create extranious
things in rabbitmq.

* reduce the cluster queue registration output. Only output when the
queue registration list changes.
2018-05-02 12:57:36 -04:00