Repository navigation
Highlights
- The published Docker image stored all data in the container's writable layer, not in the
/var/lib/s2volume, from 0.2.0 through 0.40.0 (#605, fixes #603). Unless a root was set withS2_SERVER_ROOT,-rootor the config file'sroot, the image wrote to/data, so a volume mounted at/var/lib/s2as 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 pullalone changes nothing, butdocker compose up -d(ordocker rmanddocker run) replaces the container and deletes that layer: copy the data out of/datafirst, 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 declaredVOLUME; it wasdata, which resolved to/datain 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/s2volume with an emptydocker 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(:latestpoints at it too), after the check below cmd/s2-server/v0.40.1is published separately, shortly after:go install github.com/mojatter/s2/cmd/s2-server@v0.40.1- No module's
godirective changed andgo.workis 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
/dataagain, see docs/upgrading.md.
Library users
- Nothing changes.
Storage implementers
- Nothing changes.
s2testis unchanged.
s2-server operators
- Affected: the
mojatter/s2-serverimage, 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/s2todata, and the image did not set it back. Not affected: a container givenS2_SERVER_ROOT,-rootor a config-fileroot, the 0.0.1 to 0.1.0 images, the release archives andgo install. - Check before you pull:
docker diff <container>listingA /data/...shows an affected container, running or stopped. Stop it without removing it, copy the data out withdocker 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 withdocker ps -a: one that is stopped but not removed still holds/data, anddocker cpworks on it. One that was removed, asdocker compose up -ddoes when it recreates the container, has lost that data, and s2 cannot bring it back. - A volume mounted at
/dataas a workaround is no longer used by default: setS2_SERVER_ROOT=/dataor 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, notENVor-root, so a root from the config file, env or flag still wins.