The Desktop app was never built. Open OnDemand ships it, but nothing configured it: /etc/ood/config/apps/bc_desktop was empty, the cluster had no batch_connect section, and no VNC server or window manager existed anywhere. "The desktop did not open" was a feature that had not been written. Where it runs decided how to build it. The compute nodes hold their root filesystem in RAM - 870 MB of image in a 2.9 GB tmpfs on a 5.9 GB machine - so putting XFCE and a VNC server in the node image would cost every node several hundred megabytes of memory permanently, whether or not anybody ever opened a desktop. /opt is already shared from the head and Apptainer is already on the nodes, so the desktop is a container that costs nothing until it is used. It is 337 MB as a SIF and the portal fetches it, because nobody asks for a desktop and everybody gets one. Deliberately not the @xfce group: that pulls a file manager, a browser, power management, printing and a screensaver, none of which mean anything in a batch job and all of which are paid for in bytes. What works, measured: the image builds and pushes, the head fetches it, and on a compute node the container runs Xvnc, vncserver, websockify and xfce4-session. The cluster now has batch_connect, the Desktop app appears in the portal, and its per-cluster form renders. What does not: launching a session. OnDemand drops the "desktop" attribute from the form whatever I define it as - a plain value, a hidden field, a select with options - and its submit template then fails on context.desktop. The same happens to bc_vnc_resolution. Only attributes I leave at their defaults survive, which says I have the shape of a per-cluster config wrong rather than the values in it. Committing the parts that stand on their own and stopping there. The next step is reading how bc_desktop builds its form in 4.2, not another guess - I have made several and each cost a round trip. The build has to run rootless as the service account. Root podman on this host has no working container network: dnf inside the build hangs with no CPU for six minutes and the host reaches the same mirror fine. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
39 lines
1.4 KiB
Bash
Executable File
39 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build the interactive desktop image and publish it.
|
|
#
|
|
# Run on the control plane. The head pulls it into /opt with apptainer,
|
|
# which is where the compute nodes see it - the same path the application
|
|
# catalogue uses, because this is an application like any other.
|
|
set -euo pipefail
|
|
|
|
REGISTRY=${REGISTRY:-gitea.mynodes.xyz}
|
|
OWNER=${OWNER:-hpcapps}
|
|
NAME=${NAME:-desktop}
|
|
TAG=${TAG:-xfce}
|
|
IMAGE="${REGISTRY}/${OWNER}/${NAME}:${TAG}"
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "==> building ${IMAGE}"
|
|
# --squash-all, not --squash: the latter keeps the base layers, so files
|
|
# removed in a later layer still ship. Size is the point here.
|
|
podman build --squash-all -t "${IMAGE}" .
|
|
|
|
echo "==> what was built"
|
|
podman run --rm "${IMAGE}" sh -c 'command -v Xvnc vncserver websockify xfce4-session' \
|
|
|| { echo "ABORT: the image is missing part of the desktop stack"; exit 1; }
|
|
podman image inspect "${IMAGE}" --format ' size: {{.Size}} bytes'
|
|
|
|
if [ -n "${REGISTRY_TOKEN:-}" ]; then
|
|
echo "==> pushing"
|
|
podman login -u "${REGISTRY_USER:-hpcod}" -p "${REGISTRY_TOKEN}" "${REGISTRY}"
|
|
podman push "${IMAGE}"
|
|
# Read it back. A push that printed no error has not necessarily left
|
|
# anything a puller can fetch.
|
|
podman rmi "${IMAGE}" >/dev/null 2>&1 || true
|
|
podman pull "${IMAGE}" >/dev/null
|
|
echo " pulled back from the registry"
|
|
else
|
|
echo "==> not pushing: REGISTRY_TOKEN is unset"
|
|
fi
|