diff --git a/compose/swarm/Dockerfile b/compose/swarm/Dockerfile index 5c5c773de2..5e70fa0d79 100644 --- a/compose/swarm/Dockerfile +++ b/compose/swarm/Dockerfile @@ -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; \ diff --git a/roles/svc-storage-nfs-server/templates/ganesha.conf.j2 b/roles/svc-storage-nfs-server/templates/ganesha.conf.j2 index 4e42e12609..10b22ea5fe 100644 --- a/roles/svc-storage-nfs-server/templates/ganesha.conf.j2 +++ b/roles/svc-storage-nfs-server/templates/ganesha.conf.j2 @@ -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; diff --git a/scripts/tests/deploy/swarm/utils/collect/diagnostics.sh b/scripts/tests/deploy/swarm/utils/collect/diagnostics.sh index e2990acbd2..3e0e8d9777 100755 --- a/scripts/tests/deploy/swarm/utils/collect/diagnostics.sh +++ b/scripts/tests/deploy/swarm/utils/collect/diagnostics.sh @@ -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}"