mirror of
https://github.com/ansible/awx.git
synced 2026-08-03 03:19:57 -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_kwargs": {"preload_modules": ['awx.main.dispatch.hazmat']},
|
||||
},
|
||||
"brokers": {
|
||||
"socket": {"socket_path": settings.DISPATCHERD_DEBUGGING_SOCKFILE},
|
||||
},
|
||||
"publish": {"default_control_broker": "socket"},
|
||||
"brokers": {},
|
||||
"publish": {},
|
||||
"worker": {"worker_cls": "awx.main.dispatch.worker.dispatcherd.AWXTaskWorker"},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# All Rights Reserved.
|
||||
import logging
|
||||
import yaml
|
||||
import os
|
||||
|
||||
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):
|
||||
if options.get('status'):
|
||||
if flag_enabled('FEATURE_DISPATCHERD_ENABLED'):
|
||||
|
||||
@@ -421,9 +421,6 @@ DISPATCHER_DB_DOWNTIME_TOLERANCE = 40
|
||||
# sqlite3 based tests will use this
|
||||
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'
|
||||
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
|
||||
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
|
||||
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
|
||||
AWX_ISOLATION_SHOW_PATHS = [
|
||||
'/etc/pki/ca-trust:/etc/pki/ca-trust:O',
|
||||
|
||||
Reference in New Issue
Block a user