Skip to content

v0.40.1

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Dec 11:23
· 1 commit to main since this release
b91ee95

Highlights

  • The published Docker image stored all data in the container's writable layer, not in the /var/lib/s2 volume, from 0.2.0 through 0.40.0 (#605, fixes #603). Unless a root was set with S2_SERVER_ROOT, -root or the config file's root, the image wrote to /data, so a volume mounted at /var/lib/s2 as the README shows stayed empty and removing or recreating the container deleted every bucket and object. From 0.40.1 the image defaults its root to /var/lib/s2. docker compose pull alone changes nothing, but docker compose up -d (or docker rm and docker run) replaces the container and deletes that layer: copy the data out of /data first, see s2-server operators below and docs/upgrading.md.

Only the Docker image changes: its binary is now linked with the existing server.DefaultRoot variable (there since v0.2.0) set to /var/lib/s2. No Go source file changed since v0.40.0, and the release archives and go install keep the ./data default.

Changes

Fixed

  • docker: the published image defaults its root to /var/lib/s2, its declared VOLUME; it was data, which resolved to /data in the container layer (#605, fixes #603)

CI / Build

  • The E2E workflow builds a GoReleaser snapshot and fails unless the release image stores a bucket in its /var/lib/s2 volume with an empty docker diff (#606, fixes #604)
  • Bump intra-repo deps to v0.40.0 for cmd/s2-server (#602)

Upgrading

  • Submodule consumers: go get github.com/mojatter/s2/<module>@v0.40.1
  • s2-server operators running the image: docker pull mojatter/s2-server:0.40.1 (:latest points at it too), after the check below
  • cmd/s2-server/v0.40.1 is published separately, shortly after: go install github.com/mojatter/s2/cmd/s2-server@v0.40.1
  • No module's go directive changed and go.work is unchanged since v0.40.0.
  • No change to the format of the data at rest; where the image keeps it changes, and going back to the 0.40.0 image makes the server read /data again, see docs/upgrading.md.

Library users

  • Nothing changes.

Storage implementers

  • Nothing changes. s2test is unchanged.

s2-server operators

  • Affected: the mojatter/s2-server image, 0.2.0 through 0.40.0, run with no root set, including one started as the README shows: 0.2.0 changed the binary's built-in root from /var/lib/s2 to data, and the image did not set it back. Not affected: a container given S2_SERVER_ROOT, -root or a config-file root, the 0.0.1 to 0.1.0 images, the release archives and go install.
  • Check before you pull: docker diff <container> listing A /data/... shows an affected container, running or stopped. Stop it without removing it, copy the data out with docker cp <container>:/data/. ./s2-data/, and put it in the volume before starting 0.40.1; the steps, and how to confirm afterwards that your volume is the one in use, are in docs/upgrading.md.
  • If you already updated, including through an automatic updater that follows :latest, look for the old container with docker ps -a: one that is stopped but not removed still holds /data, and docker cp works on it. One that was removed, as docker compose up -d does when it recreates the container, has lost that data, and s2 cannot bring it back.
  • A volume mounted at /data as a workaround is no longer used by default: set S2_SERVER_ROOT=/data or move the mount to /var/lib/s2. A container that already sets a root sees no change: the image moves only the built-in default, not ENV or -root, so a root from the config file, env or flag still wins.

Full Changelog

v0.40.0...v0.40.1