Repository navigation
Description
Package lifecycle paths on the 1.0 RC2 native install that leave the stack down after reboot, or in a state the user can't get out of.
Tested on release/1.0-RC2-v2 @ 40f86c0. Ubuntu 24.04 + PG18 debs (and Rocky 9 RPMs where noted) were built from that commit, installed with install.sh test-repository mode, and run in privileged systemd containers. docker restart stood in for a reboot. The upgrade source was the published 1.0-rc1 packages.
Items
-
apt remove documentdb-18+ reinstall leaves the target disabled;install.shthen reports unhealthy - Removing the
documentdbmeta package leaves nothing enabled at boot - Greenfield setup for a second major stops a running
documentdb-gateway.serviceon the same port - Package upgrades never restart PostgreSQL or say that a restart is needed
- Purge, then reinstall: no supported path (residual-data refusal, and the gateway uid changes)
- Ubuntu 26.04: the tune umask fixes are not on the release branch
- A non-interactive
apt upgradewith an edited conffile leaves packages unconfigured - Reruns and undo paths that silently lose configuration
1. remove → reinstall
- The
documentdb-18prerm runssystemctl disable [email protected]onremove. - Nothing re-enables it on reinstall, and the "next steps" banner is skipped because dpkg passes the old version.
setup.confsurvivesremove, soinstall.shgoes to status mode and exits 1 with "not healthy. Diagnose it with documentdb-setup and systemctl". The stack stays down after reboot too.
Workaround: systemctl enable --now [email protected].
Fix: either don't disable on remove, or re-enable in postinst when setup.conf exists.
2. Meta package removal
- With the meta installed, setup enables only
documentdb-local.target(the alias), not@18. apt remove documentdbdeletes the alias.- After reboot everything is inactive, and
documentdb-setup --statusreturns rc=1.
The meta's purge hint also omits postgresql-18-documentdb.
3. Second major stops a Workflow-B gateway
Setup:
- Run Workflow B on a PG17 cluster with
documentdb-gateway.servicelistening on 10260. - Run
documentdb-setup --pg-version 18(greenfield).
What happens:
- Setup logs
Stopping manually started gateway (pid ...) before systemd takeoverand kills it. - Workflow-B clients now get "Invalid account".
- Both units stay enabled. After reboot
documentdb-gateway.serviceis stuck inactivating.
Same-major is correctly refused. The port-takeover logic in documentdb-setup.sh should refuse a listener it didn't start.
4. Upgrade doesn't restart PostgreSQL
On RC1 → RC2 apt upgrade / dnf upgrade, the gateway restarted (new pid) but the postmaster kept its pid and start time. binary_extended_version() kept reporting the RC1 sha until a manual restart.
Nothing tells the user that PG needs a restart, or that documentdb-setup must be rerun to apply ALTER EXTENSION ... UPDATE. RC1 and RC2 share catalog 1.0-0, so the missing ALTER only shows from older versions.
Expected: the upgrade either restarts PostgreSQL and updates the extension, or prints exactly what to run.
5. Purge → reinstall
- Purge leaves
/var/lib/documentdb-local/18/{data,gateway/tls}but deletes thedocumentdb-gatewayuser and group (DEB postrm;dnf removedoes the same). install.shthen refuses with "Residual data ... Reconcile or remove it with documentdb-setup", butdocumentdb-setupwas purged and has no "remove data" mode.- If the user installs
documentdb-18manually and runs setup, setup silently adopts the old data and resets the admin password. - The gateway then crash-loops with
Failed to create TLS provider ... Permission denied, because the TLS files keep the old uid.
#735 tracks the uid part for RPM; this is the DEB side plus the installer refusal. Needed: a documented adopt-or-wipe path, and stable ownership of retained state.
6. Ubuntu 26.04 tune
The umask fixes on main (1dcc471, 877bdec) are not on release/1.0-RC2-v2. On a fresh Ubuntu 26.04 host, documentdb-tune exits 0 with "Config written". But the parent directories are created 0700, so postgres can't read the fragment, and after restart shared_preload_libraries is empty. A rerun repairs nothing.
These commits need backporting to the release branch. Separately, tune says "this host has no sudo" and then prints a sudo command.
7. Conffile prompt during a non-interactive upgrade
Edit /etc/documentdb/gateway/SetupConfiguration.json, then run DEBIAN_FRONTEND=noninteractive apt-get upgrade -y </dev/null.
The result is "end of file on stdin at conffile prompt". The gateway, common and documentdb-18 packages are left unconfigured (rc=100). This is standard dpkg behaviour, but the docs or the upgrade notes should mention -o Dpkg::Options::=--force-confold.
8. Reruns and undo paths
- Re-registering the gateway:
documentdb-register-gatewayrerun without--listen-addrdropsDOCUMENTDB_LISTEN_ADDR=:10261, so the gateway moves back to 10260. Before the printed "reload PostgreSQL" step, clients hang 60 s or more on peer-auth failures instead of getting an error. Related to [packaging] documentdb-setup, reset and package removal report success that isn't true #760 item 4. - Reset:
documentdb-local-resetleaves/etc/documentdb/documentdb-postgresql.envand, with the meta installed, the enabled alias. After rebootdocumentdb-local.targetis "active" with nothing running. - Undo: the "Undo setup" path (
documentdb-setup --restore) leaves the whole data directory.install.shthen refuses on residual data, and setup silently re-adopts it and resets the password.
Activity
guanzhousongmicrosoft commentedon Oct 6, 2026
1.0 blockers: item 4 (upgrade leaves the old library loaded), item 5 (purge then reinstall breaks the gateway's TLS state, same cause as #735) and item 6 (Ubuntu 26.04 tune). Items 4 and 5 are in review. Item 6 is fixed on main and still needs a backport to the 1.0 release branch. The other items don't block 1.0.
Merged PR 2343171: packaging: fix remove, purge, upgrade and rerun pa…
guanzhousongmicrosoft commentedon Nov 23, 2026
Items 1–5, 7 and 8 are addressed on main (b566aa3), and the Ubuntu 26.04 tune fix for item 6 is on main (ab0a6e1). Still to confirm: item 6 on the 1.0 release branch, and tune's "no sudo" message printing a
sudocommand.