system-config/roles-test/post.yaml
Ian Wienand 7f2e6f3325
roles/openafs-client: small overhaul of rpm builds
The main failure case for the openafs packages is when the images are
running an old kernel and upstream has moved on, and we only have
headers available for new kernels.  This usually indicates image
building is stuck.  This adds an inline check to make sure the running
kernel has headers available; if not it bails out with a clear
message.

When this does fail to build, we'd like to get some output of why the
service fails.  This adds an error handler to systemctl dump the
status on failure.

We can cleanup the build a bit to remove the centos7 builds now.

Finally, the log copying was broken -- the paths are different on
centos 8 and 9.  The extant "cp" would fail on centos8 and then the
chown would never run, so we wouldn't collect the build logs.  Make
this a find/cp pair too.

Change-Id: Iaa38357a8a683a474c38900f5dc322e088849416
2024-01-18 19:32:30 +11:00

25 lines
782 B
YAML

- hosts: localhost
tasks:
- name: Make log directories for testing hosts
file:
path: "{{ zuul.executor.log_root }}/{{ item }}/logs"
state: directory
recurse: true
loop: "{{ query('inventory_hostnames', 'all') }}"
- hosts: all
tasks:
- name: Get dkms make logs
shell: |
DKMS_MAKE_LOGS=/var/lib/dkms-make-logs
mkdir ${DKMS_MAKE_LOGS}
# pre ~ 9-stream
find /var/lib/dkms/ -type d -wholename "*/log" -exec cp -r --parents \{\} ${DKMS_MAKE_LOGS} \;
# >= 9-stream
find /var/lib/dkms/ -type d -wholename "*/build" -exec cp -r --parents \{\} ${DKMS_MAKE_LOGS} \;
chown zuul:zuul ${DKMS_MAKE_LOGS}
become: yes
- include_role:
name: stage-output