Skip to content

Commit 52e728c

Browse files
author
Dominique Quatravaux
committed
[fix] Share /var/lib/awx/projects between awx-task and awx-receptor
Moves the needle from “inventory jobs fail because they can't find anything,” to “inventory jobs fail with a Python stack trace” (for want of an `oc` binary in `$PATH`). In hindsight, it's pretty clear that if `awx-task` expects to be able to fiddle with `/etc/receptor/receptor.conf`, the two processes are supposed to run from the same container. Oh well... Here is what I could figure out from the relics left behind under `awx_verbose = true` and the previous commit: - For inventory jobs (unlike SCM jobs), `receptor` creates pods and feeds them some bizarre mix of JSON and base64-encoded ZIP files onto their stdin. Said pods are supposed to unpack and run same, and report back using a similar format. - Manual inspection of the input ZIP file for a failed inventory job, showed that said ZIP file contained a `project/` subdirectory that was empty. - From the fact that this here commit actually works, we deduce that `awx-task` cherry-picks stuff from `/var/lib/awx/projects` to fill the ZIP, sends same through `receptorctl`, `receptor` on the other side runs a Kubernetes pod as per above, and the `stdout` thereof flows the opposite way. Although I would be quite incapable of providing chapter and verse for these, either in the source code or the documentation...
1 parent 3d00cec commit 52e728c

File tree

1 file changed

+8
-0
lines changed
  • ansible/roles/awx-instance/tasks

1 file changed

+8
-0
lines changed

Diff for: ansible/roles/awx-instance/tasks/k8s.yml

+8
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@
200200
# same config file:
201201
- name: receptor-bogus-conf
202202
mountPath: /etc/receptor
203+
# Conversely, awx-task expects to “see” projects here
204+
# after awx-receptor pulls them from SCM:
205+
- name: var-lib-awx-projects
206+
mountPath: /var/lib/awx/projects
203207
- name: receptor-sock
204208
mountPath: "{{ awx_receptor_socket_path | dirname }}"
205209
env:
@@ -223,6 +227,8 @@
223227
mountPath: /etc/receptor
224228
- name: receptor-sock
225229
mountPath: "{{ awx_receptor_socket_path | dirname }}"
230+
- name: var-lib-awx-projects
231+
mountPath: /var/lib/awx/projects
226232
#####################################################
227233
- name: awx-redis
228234
image: "{{ awx_redis_image_mirrored_to }}"
@@ -296,6 +302,8 @@
296302
path: receptor.conf
297303
- name: receptor-sock
298304
emptyDir: {}
305+
- name: var-lib-awx-projects
306+
emptyDir: {}
299307
notify: Restart AWX pod
300308

301309
- meta: flush_handlers

0 commit comments

Comments
 (0)