Skip to content

3.9.0

Latest

Choose a tag to compare

@kelseym kelseym released this 09 Oct 14:54

Container Service 3.9.0 Release Notes

Container Service 3.9.0 is built for XNAT 1.10.1+ and Java 21, and no longer runs on XNAT 1.9. It adds optional scheduled cleanup of the build directories that finished containers leave behind, and reduces the database load of Docker Swarm status polling. On Kubernetes, containers that already finished are no longer finalized again, and reported as failed, when XNAT restarts.

Before You Upgrade

  • Requires XNAT 1.10.1 or a later 1.10 release, and Java 21. 3.9.0 is built against XNAT 1.10.1 and compiled for Java 21, so it doesn't load on XNAT 1.9. Sites on XNAT 1.9 should stay on 3.8.x.
  • Scripts that update the container server settings. The settings now include five build-directory cleanup fields: build-dir-cleanup-enabled, build-dir-cleanup-time, build-dir-retain-days-completed, build-dir-retain-days-failed and build-dir-retain-days-killed. A script that sends a POST to /xapi/docker/server without them turns cleanup off, and resets the cleanup time and retention periods to their defaults. The simplest approach is to GET the current settings, change what you need, and POST them back.

Features

  • GitHub #3: Clean up container build directories automatically. Build directories hold the files Container Service mounts into each container, such as its inputs and outputs, and they stay on disk after the container finishes.
    • Turning it on: cleanup is optional and off by default. Under Administer > Plugin Settings > Container Service > Compute Backend, edit the container server and check Automatically clean up build directories?
    • When it runs: once a day, at the Cleanup time (UTC) you set (default 02:00).
    • What it keeps: build directories from completed, failed and killed containers are kept for the number of days in Completed [days], Failed [days] and Killed [days] (defaults 7, 14 and 1; allowed range 1–364).
    • What it considers: only build directories of containers finalized within the past 365 days. Older directories, and directories no container references, should be cleaned up manually.
    • The first run after you turn it on may remove a large backlog in one pass.
  • Run build-directory cleanup on demand with POST /xapi/docker/server/build-dir-cleanup.
    • The same users who can change the container server settings can request a run via REST API or Swagger UI
    • The run starts within about 10 minutes, and repeated requests collapse into one run. It doesn't use up that day's scheduled run.
    • The request returns 400 if cleanup isn't turned on. The outcome of a requested run is recorded as an admin workflow entry.

Improvements

  • CS-1054: Docker Swarm status polling puts less load on the database. Each poll reads only the fields it needs for each unfinalized service, and loads a container's full record only when there's an event to process. Before, each poll loaded every unfinalized service in full twice.

Bugfixes

  • CS-1057: On Kubernetes, containers that already finished stay finished when XNAT restarts, instead of being finalized again and reported as Failed (with a failure email, if notifications are on). This affected container servers with Automatically clean up containers? turned off, where finished pods stay in the namespace and their events are replayed after a restart.