AAP-47956 Use pg_notify for cancel and debugging, abandon socket approach #16199
+5
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
The main reason we didn't do this before was that we didn't have a means of splitting messages into multi-part messages to get under the 8,000 character limit of pg_notify. This is addressed with ansible/dispatcherd#191 which I think is fairly final & durable.
Additionally, eda-server is making fast progress, and I want to push for us both to have the same solution, and the sockfile just takes too much debugging for it to be worth it.
We might add back in the socket broker later, or we might just have some sort of custom task on shutdown where we force it to dump the status output to logs or a file. If the self-check messages are, at all, working, this will probably cover us.
ISSUE TYPE
COMPONENT NAME
Note
Move dispatcher control/status/cancel to PostgreSQL NOTIFY, remove socket-based broker/debugging, and update dispatcherd dependency.
awx/main/dispatch/config.py):pg_notifybroker; setpublish.default_brokertopg_notify.default_publish_channel(usessettings.CLUSTER_HOST_ID) and servicechannels(tower_broadcast_all,tower_settings_change,get_task_queuename()).noopbroker.awx/main/management/commands/run_dispatcher.py):--status/--running/--cancelnow usedispatcherdcontrol overpg_notify.dispatcherd.config.setup(get_dispatcherd_config(...))beforerun_service().DISPATCHERD_DEBUGGING_SOCKFILEfrom defaults and production defaults.dispatcherd[pg_notify]and bump version in bothrequirements.inandrequirements.txt.Written by Cursor Bugbot for commit a2ec633. This will update automatically on new commits. Configure here.