mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
AAP-47956 Use pg_notify for cancel and debugging, abandon socket approach (#16199)
* Use pg_notify for cancel and debugging, abandon socket approach * Bump dispatcherd for pg_notify chunking
This commit is contained in:
@@ -32,10 +32,8 @@ def get_dispatcherd_config(for_service: bool = False, mock_publish: bool = False
|
|||||||
"process_manager_cls": "ForkServerManager",
|
"process_manager_cls": "ForkServerManager",
|
||||||
"process_manager_kwargs": {"preload_modules": ['awx.main.dispatch.hazmat']},
|
"process_manager_kwargs": {"preload_modules": ['awx.main.dispatch.hazmat']},
|
||||||
},
|
},
|
||||||
"brokers": {
|
"brokers": {},
|
||||||
"socket": {"socket_path": settings.DISPATCHERD_DEBUGGING_SOCKFILE},
|
"publish": {},
|
||||||
},
|
|
||||||
"publish": {"default_control_broker": "socket"},
|
|
||||||
"worker": {"worker_cls": "awx.main.dispatch.worker.dispatcherd.AWXTaskWorker"},
|
"worker": {"worker_cls": "awx.main.dispatch.worker.dispatcherd.AWXTaskWorker"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
import logging
|
import logging
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
|
||||||
|
|
||||||
import redis
|
import redis
|
||||||
|
|
||||||
@@ -48,10 +47,6 @@ class Command(BaseCommand):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
def verify_dispatcherd_socket(self):
|
|
||||||
if not os.path.exists(settings.DISPATCHERD_DEBUGGING_SOCKFILE):
|
|
||||||
raise CommandError('Dispatcher is not running locally')
|
|
||||||
|
|
||||||
def handle(self, *arg, **options):
|
def handle(self, *arg, **options):
|
||||||
if options.get('status'):
|
if options.get('status'):
|
||||||
if flag_enabled('FEATURE_DISPATCHERD_ENABLED'):
|
if flag_enabled('FEATURE_DISPATCHERD_ENABLED'):
|
||||||
|
|||||||
@@ -421,9 +421,6 @@ DISPATCHER_DB_DOWNTIME_TOLERANCE = 40
|
|||||||
# sqlite3 based tests will use this
|
# sqlite3 based tests will use this
|
||||||
DISPATCHER_MOCK_PUBLISH = False
|
DISPATCHER_MOCK_PUBLISH = False
|
||||||
|
|
||||||
# Debugging sockfile for the --status command
|
|
||||||
DISPATCHERD_DEBUGGING_SOCKFILE = os.path.join(BASE_DIR, 'dispatcherd.sock')
|
|
||||||
|
|
||||||
BROKER_URL = 'unix:///var/run/redis/redis.sock'
|
BROKER_URL = 'unix:///var/run/redis/redis.sock'
|
||||||
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
|
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
|
||||||
REDIS_BACKOFF_CAP = 1.0 # Maximum backoff delay in seconds for Redis retries
|
REDIS_BACKOFF_CAP = 1.0 # Maximum backoff delay in seconds for Redis retries
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ ALLOWED_HOSTS = []
|
|||||||
# only used for deprecated fields and management commands for them
|
# only used for deprecated fields and management commands for them
|
||||||
BASE_VENV_PATH = os.path.realpath("/var/lib/awx/venv")
|
BASE_VENV_PATH = os.path.realpath("/var/lib/awx/venv")
|
||||||
|
|
||||||
# Switch to a writable location for the dispatcher sockfile location
|
|
||||||
DISPATCHERD_DEBUGGING_SOCKFILE = os.path.realpath('/var/run/tower/dispatcherd.sock')
|
|
||||||
|
|
||||||
# Very important that this is editable (not read_only) in the API
|
# Very important that this is editable (not read_only) in the API
|
||||||
AWX_ISOLATION_SHOW_PATHS = [
|
AWX_ISOLATION_SHOW_PATHS = [
|
||||||
'/etc/pki/ca-trust:/etc/pki/ca-trust:O',
|
'/etc/pki/ca-trust:/etc/pki/ca-trust:O',
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ setuptools_scm[toml]
|
|||||||
setuptools-rust>=0.11.4 # cryptography build dep
|
setuptools-rust>=0.11.4 # cryptography build dep
|
||||||
pkgconfig>=1.5.1 # xmlsec build dep - needed for offline build
|
pkgconfig>=1.5.1 # xmlsec build dep - needed for offline build
|
||||||
django-flags>=5.0.13
|
django-flags>=5.0.13
|
||||||
dispatcherd # tasking system, previously part of AWX code base
|
dispatcherd[pg_notify] # tasking system, previously part of AWX code base
|
||||||
protobuf>=4.25.8 # CVE-2025-4565
|
protobuf>=4.25.8 # CVE-2025-4565
|
||||||
idna>=3.10 # CVE-2024-3651
|
idna>=3.10 # CVE-2024-3651
|
||||||
# Temporarily added to use ansible-runner from git branch, to be removed
|
# Temporarily added to use ansible-runner from git branch, to be removed
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ cython==3.1.3
|
|||||||
# via -r /awx_devel/requirements/requirements.in
|
# via -r /awx_devel/requirements/requirements.in
|
||||||
daphne==4.2.1
|
daphne==4.2.1
|
||||||
# via -r /awx_devel/requirements/requirements.in
|
# via -r /awx_devel/requirements/requirements.in
|
||||||
dispatcherd==2025.5.21
|
dispatcherd[pg_notify]==2025.12.10
|
||||||
# via -r /awx_devel/requirements/requirements.in
|
# via -r /awx_devel/requirements/requirements.in
|
||||||
distro==1.9.0
|
distro==1.9.0
|
||||||
# via -r /awx_devel/requirements/requirements.in
|
# via -r /awx_devel/requirements/requirements.in
|
||||||
@@ -138,7 +138,7 @@ django==5.2.8
|
|||||||
# django-solo
|
# django-solo
|
||||||
# djangorestframework
|
# djangorestframework
|
||||||
# drf-spectacular
|
# drf-spectacular
|
||||||
# django-ansible-base[feature-flags,jwt-consumer,rbac,resource-registry,rest-filters] @ git+https://github.com/ansible/django-ansible-base@devel # git requirements installed separately
|
# django-ansible-base @ git+https://github.com/ansible/django-ansible-base@devel # git requirements installed separately
|
||||||
# via -r /awx_devel/requirements/requirements_git.txt
|
# via -r /awx_devel/requirements/requirements_git.txt
|
||||||
django-cors-headers==4.9.0
|
django-cors-headers==4.9.0
|
||||||
# via -r /awx_devel/requirements/requirements.in
|
# via -r /awx_devel/requirements/requirements.in
|
||||||
|
|||||||
Reference in New Issue
Block a user