Fixes#5: the server's configuration and mail ended up in anonymous volumes, because compose.yaml mounted the named volumes at /opt/stalwart/{etc,data}, which the server never reads.
Template:inbuxa-etc → /etc/inbuxa, inbuxa-data → /var/lib/inbuxa, the paths the image uses.
Migration on converge (internal/apply/volumes.go). It runs before anything is recreated, because up with the new mounts would otherwise lay the empty named volumes over the real data. It reads the server container's mounts. When the data is in a different volume:
it stops the server and copies each volume into its named one (cp -a, as root, using the server's own image);
it lets the normal up recreate the server;
it checks the server comes back live and not in bootstrap mode.
It never overwrites a named volume that already holds something. In that case it starts the server again as it was (compose start, not up) and stops. The old anonymous volumes are kept for undoing the move.
e2e/vm/run.sh: a new OLD_REF=<commit> builds and copies in a pre-fix installer as /tmp/inbuxa-old.
Tests (debian13 lab):
upgrade-volumes (new), OLD_REF=2fce971: 15/15. It confirms the old layout, upgrades, and checks the first mailbox still signs in after the upgrade, after down + up, and on a further run that moves nothing.
install-local: 26/26.
install-public: 20/20.
topology: 28/28.
status-export: 16/16.
Unit tests: pass, uncached.
Fixes #5: the server's configuration and mail ended up in anonymous volumes, because `compose.yaml` mounted the named volumes at `/opt/stalwart/{etc,data}`, which the server never reads.
- **Template:** `inbuxa-etc` → `/etc/inbuxa`, `inbuxa-data` → `/var/lib/inbuxa`, the paths the image uses.
- **Migration on converge** (`internal/apply/volumes.go`). It runs before anything is recreated, because `up` with the new mounts would otherwise lay the empty named volumes over the real data. It reads the server container's mounts. When the data is in a different volume:
- it stops the server and copies each volume into its named one (`cp -a`, as root, using the server's own image);
- it lets the normal `up` recreate the server;
- it checks the server comes back live and not in bootstrap mode.
It never overwrites a named volume that already holds something. In that case it starts the server again as it was (`compose start`, not `up`) and stops. The old anonymous volumes are kept for undoing the move.
- **`e2e/vm/run.sh`:** a new `OLD_REF=<commit>` builds and copies in a pre-fix installer as `/tmp/inbuxa-old`.
**Tests** (debian13 lab):
- **upgrade-volumes (new), `OLD_REF=2fce971`:** 15/15. It confirms the old layout, upgrades, and checks the first mailbox still signs in after the upgrade, after `down` + `up`, and on a further run that moves nothing.
- **install-local:** 26/26.
- **install-public:** 20/20.
- **topology:** 28/28.
- **status-export:** 16/16.
- **Unit tests:** pass, uncached.
compose.yaml mounted inbuxa-etc and inbuxa-data at /opt/stalwart/etc and
/opt/stalwart/data, where the server never looks. The image keeps its
configuration and mail in /etc/inbuxa and /var/lib/inbuxa, so they went
into anonymous volumes: a `docker compose down` and `up` started the server
empty, in bootstrap mode, and backups of the named volumes held nothing.
The named volumes are now mounted where the server keeps its data. An
install made before this is moved over on its next run, before anything is
recreated, since recreating it first would lay the empty named volumes over
the real data: the server is stopped, each anonymous volume is copied into
its named one, and the run checks the server comes back configured rather
than in bootstrap mode. A named volume that already holds something is
never overwritten; the server is started again as it was and the run
stops. The old anonymous volumes are kept, so the move can be undone.
e2e/cases/upgrade-volumes.sh installs with an installer from before this
(OLD_REF, built by run.sh), upgrades, and checks the first mailbox still
signs in after the upgrade, after a down and up, and on a further run.
Fixes#5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #5: the server's configuration and mail ended up in anonymous volumes, because
compose.yamlmounted the named volumes at/opt/stalwart/{etc,data}, which the server never reads.Template:
inbuxa-etc→/etc/inbuxa,inbuxa-data→/var/lib/inbuxa, the paths the image uses.Migration on converge (
internal/apply/volumes.go). It runs before anything is recreated, becauseupwith the new mounts would otherwise lay the empty named volumes over the real data. It reads the server container's mounts. When the data is in a different volume:cp -a, as root, using the server's own image);uprecreate the server;It never overwrites a named volume that already holds something. In that case it starts the server again as it was (
compose start, notup) and stops. The old anonymous volumes are kept for undoing the move.e2e/vm/run.sh: a newOLD_REF=<commit>builds and copies in a pre-fix installer as/tmp/inbuxa-old.Tests (debian13 lab):
OLD_REF=2fce971: 15/15. It confirms the old layout, upgrades, and checks the first mailbox still signs in after the upgrade, afterdown+up, and on a further run that moves nothing.