From 9e833af950c6aaeda019a4f1f23ac4291eb9e232 Mon Sep 17 00:00:00 2001 From: Blai Peidro Date: Tue, 15 Sep 2026 00:12:38 +0200 Subject: [PATCH 1/2] fix: accept both names for a job's private data directory The platform renamed the prefix on a job's private data directory from awx_ to ascender_, so the volume mount this looks for to find the controller's copy is /tmp/ascender_ on a current server and /tmp/awx_ on an older one. Both are accepted rather than swapping one for the other. A client is not installed alongside the server it talks to and there is no version negotiation here, so pinning either name alone breaks against half the releases, and the symptom is a RuntimeError saying no private_data_dir could be found rather than anything naming a version mismatch. --- ascenderkit/api/pages/unified_jobs.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ascenderkit/api/pages/unified_jobs.py b/ascenderkit/api/pages/unified_jobs.py index a9e42a6..760656f 100644 --- a/ascenderkit/api/pages/unified_jobs.py +++ b/ascenderkit/api/pages/unified_jobs.py @@ -139,17 +139,20 @@ def controller_dir(self): """ self.get() job_args = self.job_args - # Server-side value, not a brand reference: this must stay in step with - # JOB_FOLDER_PREFIX in awx/main/constants.py over in ctrliq/ascender. - expected_prefix = f'/tmp/awx_{self.id}' + # Server-side values, not brand references: these must stay in step with + # JOB_FOLDER_PREFIX and FORMER_JOB_FOLDER_PREFIX in + # ascender/main/constants.py over in ctrliq/ascender. Both are accepted, + # because this client talks to whichever release the server is running + # and the folder name changed between two of them. + expected_prefixes = (f'/tmp/ascender_{self.id}', f'/tmp/awx_{self.id}') for arg1, arg2 in zip(job_args[:-1], job_args[1:]): if arg1 == '-v': if ':' in arg2: host_loc = arg2.split(':')[0] - if host_loc.startswith(expected_prefix): + if host_loc.startswith(expected_prefixes): return host_loc raise RuntimeError( - f'Could not find a controller private_data_dir for this job. Searched for volume mount to {expected_prefix} inside of args {job_args}' + f'Could not find a controller private_data_dir for this job. Searched for a volume mount to one of {expected_prefixes} inside of args {job_args}' ) From 7c633c5ed398d5bc7ddf12ecdb8c7b4752a3cad1 Mon Sep 17 00:00:00 2001 From: Blai Peidro Date: Tue, 15 Sep 2026 00:14:50 +0200 Subject: [PATCH 2/2] fix: default the websocket session cookie to ascender_sessionid The platform renamed SESSION_COOKIE_NAME from awx_sessionid, so the cookie WSClient sends had the wrong name. Unlike the HTTP side this one cannot take both. Connection reads the name from the X-API-Session-Cookie-Name header at login and so is right against any release, but the websocket cookie is sent rather than read and has to be the single name the server expects. The default follows the current server, and the comment now says that a caller holding a Connection should pass its session_cookie_name rather than rely on the default, which is the only thing that is correct against an older one. --- ascenderkit/ws.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ascenderkit/ws.py b/ascenderkit/ws.py index 671b258..b4a7671 100644 --- a/ascenderkit/ws.py +++ b/ascenderkit/ws.py @@ -60,8 +60,13 @@ def __init__( csrftoken=None, add_received_time=False, # Server-side value, not a brand reference: this must stay in step with - # SESSION_COOKIE_NAME in awx/settings/defaults.py over in ctrliq/ascender. - session_cookie_name='awx_sessionid', + # SESSION_COOKIE_NAME in ascender/settings/defaults.py over in + # ctrliq/ascender, which was awx_sessionid before the rename. Unlike the + # HTTP side this cookie is sent rather than read, so it has to be the one + # name the server expects: a caller holding a Connection should pass its + # session_cookie_name, which Connection discovers from the + # X-API-Session-Cookie-Name header at login and is right for any release. + session_cookie_name='ascender_sessionid', verify=None, ): # delay this import, because this is an optional dependency