test(nfs): make a wedged ganesha startup describable

The role runs ganesha at -N NIV_EVENT, and roughly eighteen init steps between the CLIENT commits and the listener log below that level, so the silence in run 30699990912 marked the edge of visibility rather than the fault. Raise INIT and DISPATCH under MODE_DEBUG: nfs_Init_svc(), which binds 2049, logs under COMPONENT_DISPATCH, so INIT alone would have missed exactly the step in question.

Add a userspace backtrace beside the kernel stack dump, which only ever says futex_do_wait. eu-stack names the function holding the lock; elfutils goes into the lab image rather than the role, since a production NFS server should not carry a debugger.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-08-01 18:32:22 +02:00
1 parent fcc69f1067
commit 1aea8a472e
3 files changed
+24 -3

No files matched your search

+3 -3
View File
@@ -22,14 +22,14 @@ FROM ${INFINITO_IMAGE}
RUN set -eux; \
if command -v apt-get >/dev/null 2>&1; then \
apt-get update -qq; \
apt-get install -y -qq --no-install-recommends dnsmasq openssh-server cryptsetup e2fsprogs; \
apt-get install -y -qq --no-install-recommends dnsmasq openssh-server cryptsetup e2fsprogs elfutils; \
rm -rf /var/lib/apt/lists/*; \
elif command -v dnf >/dev/null 2>&1; then \
dnf install -y dnsmasq openssh-server cryptsetup e2fsprogs; \
dnf install -y dnsmasq openssh-server cryptsetup e2fsprogs elfutils; \
dnf clean all; \
elif command -v pacman >/dev/null 2>&1; then \
pacman -Sy --noconfirm --needed archlinux-keyring; \
pacman -Syu --noconfirm --needed dnsmasq openssh cryptsetup e2fsprogs; \
pacman -Syu --noconfirm --needed dnsmasq openssh cryptsetup e2fsprogs elfutils; \
rm -rf /var/cache/pacman/pkg/*; \
else \
echo "no supported package manager (apt/dnf/pacman)" >&2; exit 1; \
@@ -1,4 +1,13 @@
# Managed by Ansible role svc-storage-nfs-server (flavor: ganesha / FSAL_VFS).
{% if MODE_DEBUG | bool %}
LOG {
components {
INIT = FULL_DEBUG;
DISPATCH = DEBUG;
}
}
{% endif %}
NFS_CORE_PARAM {
Protocols = 4;
Enable_NLM = false;
@@ -98,6 +98,18 @@ for t in /proc/${pid}/task/*; do
cat ${t}/stack 2>&1
done'
sep "ganesha-userstack" "nfs-server: ganesha userspace backtrace (the kernel stack only says futex; this says whose lock)"
# shellcheck disable=SC2016
dexec "${NFS_SERVER}" sh -c 'pid=$(systemctl show -p MainPID --value nfs-ganesha 2>/dev/null)
[ "${pid:-0}" -gt 0 ] || { echo "(nfs-ganesha reports no main pid)"; exit 0; }
if command -v eu-stack >/dev/null 2>&1; then
eu-stack -p "${pid}" 2>&1
elif command -v gdb >/dev/null 2>&1; then
gdb -p "${pid}" -batch -ex "thread apply all bt" 2>&1
else
echo "(neither eu-stack nor gdb is installed on this node)"
fi'
sep "controller-nfs" "controller (this runner): NFS reachability of nfs-server"
_nfs_ip="$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}' "${NFS_SERVER}")"
echo "nfs-server container IP(s): ${_nfs_ip}"