Commit Graph

32 Commits

Author SHA1 Message Date
Yunfan Zhang
5c23c63e6d Prevent implicit project updates from blocking jobs.
Signed-off-by: Yunfan Zhang <yz322@duke.edu>
2018-08-15 11:48:58 -04:00
AlanCoding
7aa7cc1c98 add current workflow job to running list 2018-08-08 07:49:02 -04:00
Ryan Petrello
91c92d57e3 fix a bug in isolated job launches when there are no controllers online
see: https://github.com/ansible/tower/issues/2782
2018-08-07 17:27:23 -04:00
Wayne Witzel III
74ed1c2c40 fetch running workflow jobs once per process 2018-08-02 11:46:38 -04:00
Wayne Witzel III
da603dd3ad use workflow_template_id 2018-08-01 15:55:19 -04:00
Wayne Witzel III
c96cf3cf5d unless allow_simultaneous, do not start workflow jobs that are already running 2018-08-01 14:53:00 -04:00
Ryan Petrello
ef6433c6f9 Revert "fix celery task reaper"
This reverts commit 1359208a99.
2018-06-18 16:18:20 -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
b94cf379f6 do not choose offline instances 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
AlanCoding
84d9273012 add corresponding log for WorkflowJob submission 2018-04-26 09:30:19 -04:00
Matthew Jones
2f3d7b17f6 Fix an issue where missing instance group would cause an error
We'll now default to queue submission to the basic management queue
2018-04-26 09:11:08 -04:00
Matthew Jones
4af8a53232 Remove Instance Group concept/usage from WorkflowJobs
This also relaxes some of the task manager rules on Instance Groups
down the full stack such that workflow jobs tend to shortcut the
processing or omit it altogether.

This lets the workflow job spawning logic exist outside of the
instance group queues, which it doesn't need to participate in in the
first place.
2018-04-25 08:29:49 -04:00
AlanCoding
4ff2f3e061 remove setting corresponding to removed tests 2018-04-16 14:49:54 -04:00
Ryan Petrello
f59f47435b send job notification templates _after_ all events have been processed
see: https://github.com/ansible/awx/issues/500
2018-03-22 09:30:41 -04:00
chris meyers
91bfed3d50 handle instance group names unicode 2018-03-21 13:41:48 -04:00
Wayne Witzel III
91c6d406c5 Rollback celery 2018-02-22 09:37:14 -05:00
Bill Nottingham
7b288ef98a Tweak celery-related messages. 2018-02-13 10:52:14 -05:00
AlanCoding
1f8cab4171 intentionally forget start_args when job is done 2017-12-10 12:08:54 -05:00
AlanCoding
34a8e0a9b6 Feature: saved launchtime configurations
Consolidate prompts accept/reject logic in unified models
Break out accept/reject logic for variables
Surface new promptable fields on WFJT nodes, schedules

Make schedules and workflows accurately reject variables
  that are not allowed by the prompting
  rules or the survey rules on the template

Validate against unallowed extra_data in system job schedules
Prevent schedule or WFJT node POST/PATCH with unprompted data
Move system job days validation to new mechanism
Add new psuedo-field for WFJT node credential
Add validation for node related credentials
Add related config model to unified job
Use JobLaunchConfig model for launch RBAC check

Support credential overwrite behavior with multi-creds
  change modern manual launch to use merge behavior
Refactor JobLaunchSerializer, self.instance=None
Modularize job launch view to create "modern" data
Auto-create config object with every job
Add create schedule endpoint for jobs
2017-12-08 13:38:54 -05:00
Matthew Jones
9ee77a95c6 Delay instantiation of the celery app for the inspector
This keeps the instance from re-using a pool that might have already
expired and is unusable for the inspector that needs to run as part of
the task manager
2017-11-14 10:33:47 -05:00
Wayne Witzel III
f118e27047 Flake8 fixes and URL updates 2017-11-10 17:04:33 -05:00
Aaron Tan
bcd2a8f211 Merge pull request #382 from jangsutsr/fix-264
Implement workflow job failure
2017-10-12 16:34:08 -04:00
Aaron Tan
5287e5c111 Implement workflow job failure
Relates #264.

This PR proposed and implemented a way of defining workflow failure
state:

A workflow job fails if one of the conditions below satisfies.
* At least one node runs into states `canceled` or `error`.
* At least one leaf node runs into states `failed`, but no child node is
  spawned to run (no error handler).

Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
2017-10-12 11:08:33 -04:00
AlanCoding
f03b40aa50 enforce max line length of 160 characters 2017-10-11 12:38:39 -04:00
Matthew Jones
3e38a0c17d Add unit test for inventory_sources_already_updated 2017-09-27 16:52:05 -04:00
Matthew Jones
f4c9617f95 Check for inventory sources already updated from start args
In the case where the host didn't exist in the inventory source and
was found in the first inventory sync
2017-09-27 16:31:22 -04:00
Matthew Jones
7861cda6fe Remove the logic blocking dependent inventory updates on callbacks 2017-09-27 16:00:05 -04:00
AlanCoding
dba83674a2 fix task manager running task structures
- prevent dual-entry for first item in running jobs due to
   setdefault syntax
 - fix issue where queues (celery tasks) only returned the last
   item in the inspector output due to looping problem
   this caused reaper bugs in production
2017-09-21 14:38:58 -04:00
Wayne Witzel III
439beeab3b Merge pull request #224 from wwitzel3/fix-shared-deps
Fix job shared dependencies.
2017-09-20 14:56:22 -04:00