1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00
Commit Graph

24806 Commits

Author SHA1 Message Date
chris meyers
b6b9802f9e
increase per-channel capacity
* 100 is the default capacity for a channel. If the client doesn't read
the socket fast enough, websocket messages can and will be lost. This
increases the default to 10,000
2020-03-18 16:10:18 -04:00
chris meyers
0da94ada2b
add missing service name to dev env
* Dev env was bringing the wsbroadcast service up but not under the
tower-process dependency. This is cleaner.
2020-03-18 16:10:18 -04:00
chris meyers
3b9e67ed1b
remove channel group model
* Websocket user session <-> group subscription membership now resides
in Redis rather than the database.
2020-03-18 16:10:18 -04:00
chris meyers
14320bc8e6
handle websocket unsubscribe
* Do not return from blocking unsubscribe until _after_ putting the
gotten unsubscribe message on the queue so that it can be read by the
thread of execution that was unblocked.
2020-03-18 16:10:18 -04:00
chris meyers
3c5c9c6fde
move broadcast websocket out into its own process 2020-03-18 16:10:18 -04:00
chris meyers
f5193e5ea5
resolve rebase errors 2020-03-18 16:10:17 -04:00
chris meyers
03b73027e8
websockets aware of Instance changes
* New tower nodes that are (de)registered in the Instance table are seen
by the websocket layer and connected to or disconnected from by the
websocket broadcast backplane using a polling mechanism.
* This is especially useful for openshift and kubernetes. This will be
useful for standalone Tower in the future when the restarting of Tower
services is not required.
2020-03-18 16:10:17 -04:00
chris meyers
c06b6306ab
remove health info
* Sending health about websockets over websockets is not a great idea.
* I tried sending health data via prometheus and encountered problems
that will need PR's to prometheus_client library to solve. Circle back
to this later.
2020-03-18 16:10:17 -04:00
Shane McDonald
45ce6d794e
Initial migration of rabbitmq -> redis for k8s installs 2020-03-18 16:10:17 -04:00
chris meyers
e94bb44082
replace rabbitmq with redis
* local awx docker-compose and image build only.
2020-03-18 16:10:17 -04:00
chris meyers
be58906aed
remove kombu 2020-03-18 16:10:17 -04:00
chris meyers
403e9bbfb5
add websocket health information 2020-03-18 16:10:16 -04:00
chris meyers
ea29f4b91f
account for isolated job status
* We can not query the dispatcher running on isolated nodes to see if
the playbook is still running because that is the nature of isolated
nodes, they don't run the dispatcher nor do they run the message broker.
Therefore, we should query the control node that is arbitrating the
isolated work. If the control node process in the dispatcher is dead,
consider the iso job dead.
2020-03-18 16:10:16 -04:00
chris meyers
3f2d757f4e
update awxkit to use new unsubscribe event
* Instead of waiting an arbitrary number of seconds. We can now wait the
exact amount of time needed to KNOW that we are unsubscribed. This
changeset takes advantage of the new subscribe reply semantic.
2020-03-18 16:10:16 -04:00
chris meyers
feac93fd24
add websocket group unsubscribe reply
* This change adds more than just an unsubscribe reply.
* Websockets canrequest to join/leave groups. They do so using a single
idempotent request. This change replies to group requests over the
websockets with the diff of the group subscription. i.e. what groups the
user currenntly is in, what groups were left, and what groups were
joined.
2020-03-18 16:10:16 -04:00
chris meyers
088373963b
satisfy generic Role code
* User in channels session is a lazy user class. This does not conform
to what the generic Role ancestry code expects. The Role ancestry code
expects a User objects. This change converts the lazy object into a
proper User object before calling the permission code path.
2020-03-18 16:10:16 -04:00
chris meyers
5818dcc980
prefer simple async -> sync
* asgiref async_to_sync was causing a Redis connection _for each_ call
to emit_channel_notification i.e. every event that the callback receiver
processes. This is a "known" issue
https://github.com/django/channels_redis/pull/130#issuecomment-424274470
and the advise is to slow downn the rate at which you call
async_to_sync. That is not an option for us. Instead, we put the async
group_send call onto the event loop for the current thread and wait for
it to be processed immediately.

The known issue has to do with event loop + socket relationship. Each
connection to redis is achieved via a socket. That conection can only be
waiting on by the event loop that corresponds to the calling thread.
async_to_sync creates a _new thread_ for each invocation. Thus, a new
connection to redis is required. Thus, the excess redis connections that
can be observed via netstat | grep redis | wc -l.
2020-03-18 16:10:16 -04:00
chris meyers
dc6c353ecd
remove support for multi-reader dispatch queue
* Under the new postgres backed notify/listen message queue, this never
actually worked. Without using the database to store state, we can not
provide a at-most-once delivery mechanism w/ multi-readers.
* With this change, work is done ONLY on the node that requested for the
work to be done. Under rabbitmq, the node that was first to get the
message off the queue would do the work; presumably the least busy node.
2020-03-18 16:10:16 -04:00
chris meyers
50b56aa8cb
autobahn 20.1.2 released an hour ago
* 20.1.1 no longer available on pypi
2020-03-18 16:10:15 -04:00
chris meyers
3fec69799c
fix websocket job subscription access control 2020-03-18 16:10:15 -04:00
chris meyers
2a2c34f567
combine all the broker replacement pieces
* local redis for event processing
* postgres for message broker
* redis for websockets
2020-03-18 16:10:15 -04:00
chris meyers
558e92806b
POC postgres broker 2020-03-18 16:10:15 -04:00
chris meyers
355fb125cb
redis events 2020-03-18 16:10:15 -04:00
chris meyers
c8eeacacca
POC channels 2 2020-03-18 16:10:12 -04:00
softwarefactory-project-zuul[bot]
d0a3c5a42b
Merge pull request #6323 from AlanCoding/rm_verify_ssl_test
Replace verify_ssl test that did not work right

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 19:33:24 +00:00
softwarefactory-project-zuul[bot]
64139f960f
Merge pull request #6331 from marshmalien/fix-project-schedule-breadcrumb
Add nested project schedule detail breadcrumb

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 19:33:19 +00:00
softwarefactory-project-zuul[bot]
eda494be63
Merge pull request #6330 from rooftopcellist/fix_flakey_workflow_functest
Fix flaky workflow test & set junit family

Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
             https://github.com/rooftopcellist
2020-03-18 19:27:26 +00:00
Christian Adams
4a0c371014 Fix flaky workflow test & set junit family 2020-03-18 14:02:33 -04:00
softwarefactory-project-zuul[bot]
6b43da35e1
Merge pull request #5745 from wenottingham/no-license-and-registration-please
Clean up a few more cases where we checked the license for features.

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 17:59:16 +00:00
softwarefactory-project-zuul[bot]
afa3b500d3
Merge pull request #6273 from AlanCoding/failure_verbosity
Print module standard out in test failure scenarios

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 17:50:16 +00:00
softwarefactory-project-zuul[bot]
c3efb13020
Merge pull request #6325 from AlanCoding/autohack
Automatically hack sys.path to make running tests easier

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 17:46:59 +00:00
Marliana Lara
eb28800082
Fix nested project schedule breadcrumb 2020-03-18 13:17:42 -04:00
softwarefactory-project-zuul[bot]
3219b9b4ac
Merge pull request #6318 from AlexSCorey/6100-ConvertWFJTandJTtoHooks
Moves JT Form to using react hooks and custom hooks

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 15:58:13 +00:00
softwarefactory-project-zuul[bot]
e9a48cceba
Merge pull request #6319 from squidboylan/collection_test_refactor
Collection test refactor

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 14:53:04 +00:00
softwarefactory-project-zuul[bot]
9a7fa1f3a6
Merge pull request #6313 from mabashian/jest-24-25-upgrade
Upgrade jest and babel-jest to latest (v25)

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 14:33:44 +00:00
Caleb Boylan
a03d74d828 Collection: Use random names when we create objects in our tests 2020-03-18 07:02:14 -07:00
mabashian
2274b4b4e4 Upgrade jest and babel-jest to latest (v25) 2020-03-18 09:44:25 -04:00
AlanCoding
c054d7c3d7
Automatically hack sys.path to make running tests easier 2020-03-18 09:40:11 -04:00
softwarefactory-project-zuul[bot]
26d5d7afdc
Merge pull request #6304 from AlanCoding/workflow_role
Add workflow to tower_role module

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 03:13:37 +00:00
softwarefactory-project-zuul[bot]
6b51b41897
Merge pull request #6322 from AlanCoding/user_no_log
Mark user password as no_log to silence warning

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 01:58:27 +00:00
AlanCoding
ca3cf244fd
Replace verify_ssl test that did not work right 2020-03-17 21:43:30 -04:00
softwarefactory-project-zuul[bot]
88d7b24f55
Merge pull request #6311 from jlmitch5/fixDupID
change duplicate IDs where possible

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-18 01:03:49 +00:00
AlanCoding
ecdb353f6f
Mark user password as no_log to silence warning 2020-03-17 19:49:27 -04:00
AlanCoding
d9932eaf6a
Add integration test 2020-03-17 19:37:30 -04:00
softwarefactory-project-zuul[bot]
cbc52fa19f
Merge pull request #6278 from AlanCoding/wfjt_tests
Add more tests for recent WFJT module issues

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-17 23:02:14 +00:00
softwarefactory-project-zuul[bot]
cc77b31d4e
Merge pull request #6314 from mabashian/6293-toggle-error
Adds error div to toggle fields built using form generator

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-17 21:34:18 +00:00
Bill Nottingham
b875c03f4a Clean up a few more cases where we checked the license for features. 2020-03-17 17:19:33 -04:00
Alex Corey
e87f804c92 Moves JT Form to using react hooks and custom hooks 2020-03-17 16:40:09 -04:00
softwarefactory-project-zuul[bot]
f86cbf33aa
Merge pull request #6307 from mabashian/eslint-5-6-upgrade
Bumps eslint from 5.6 to 6.8

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-17 20:24:13 +00:00
mabashian
6db6fe90fd Adds error div to toggle fields built using form generator so that errors can be shown underneath the toggle 2020-03-17 15:27:16 -04:00