docs(uninstall): 更正 felis_pgint 的来历说明

This commit is contained in:
Lemon-miaow committed 2026-09-26 11:38:34 +08:00
1 parent 1f2a6130ac
commit 12d2697801
3 files changed
+7 -6

No files matched your search

+5 -4
View File
@@ -340,10 +340,11 @@ remove_hba_block() { # file
rm -f "$tmp" rm -f "$tmp"
} }
# check_database_purge runs before anything is removed: DROP ROLE refuses a role that # check_database_purge runs before anything is removed. DROP ROLE refuses a role that
# still owns a database or holds anything in one besides felis (a felis_pgint left by # still owns a database or holds anything in one besides felis (the felis_pgint database
# `felis db pgint`, a grant made by hand), and by then the units and k3s are already gone. # CONTRIBUTING.md has developers make for the PG contract tests, a grant made by hand),
# It lists what holds the role instead, so the purge either runs to the end or not at all. # and by the time purge_database runs the units and k3s are already gone. It lists what
# holds the role instead, so the purge either runs to the end or not at all.
check_database_purge() { check_database_purge() {
[ "$PURGE" = 1 ] || return 0 [ "$PURGE" = 1 ] || return 0
systemctl is-active --quiet postgresql 2>/dev/null || return 0 systemctl is-active --quiet postgresql 2>/dev/null || return 0
+1 -1
View File
@@ -191,7 +191,7 @@ esac
expect "purge cleans Docker's build cache" "DOCKER builder prune -af" "$calls" expect "purge cleans Docker's build cache" "DOCKER builder prune -af" "$calls"
# --- a purge DROP ROLE would refuse ------------------------------------------------------- # --- a purge DROP ROLE would refuse -------------------------------------------------------
# The VM drill: `felis db pgint` had left felis_pgint owned by felis, the purge removed the # The VM drill: the PG contract tests' felis_pgint was owned by felis, the purge removed the
# units and k3s, then stopped at DROP ROLE with half the host gone. # units and k3s, then stopped at DROP ROLE with half the host gone.
untouched() { # label untouched() { # label
[ -d "$root/h/opt" ] && [ -f "$root/h/units/felis-velocity.service" ] && [ -d "$root/h/etc" ] \ [ -d "$root/h/opt" ] && [ -f "$root/h/units/felis-velocity.service" ] && [ -d "$root/h/etc" ] \
+1 -1
View File
@@ -210,7 +210,7 @@ the cluster holds nothing but Felis's namespaces; when it runs anything else onl
| | keep data (default) | `--purge` | | | keep data (default) | `--purge` |
|---|---|---| |---|---|---|
| Final database bundle | taken first (`felis db backup -label manual`); a failure stops the uninstall before anything is removed. `--no-backup` skips it | none | | Final database bundle | taken first (`felis db backup -label manual`); a failure stops the uninstall before anything is removed. `--no-backup` skips it | none |
| `felis` database and role | kept | dropped; `listen_addresses` and `pg_hba.conf` go back to how they were. Checked before anything is removed: a role that still owns another database (a `felis_pgint` left by `felis db pgint`) or holds grants elsewhere stops the purge up front with the list and the `ALTER DATABASE … OWNER TO postgres` to run | | `felis` database and role | kept | dropped; `listen_addresses` and `pg_hba.conf` go back to how they were. Checked before anything is removed: a role that still owns another database (the `felis_pgint` the PG contract tests use, CONTRIBUTING.md) or holds grants elsewhere stops the purge up front with the list and the `ALTER DATABASE … OWNER TO postgres` to run |
| `/etc/felis` (secrets, `felis.toml`, `offsite.env`, tunnel config) | kept; `bootstrap.done` and the per-run records go | deleted, with the tunnel's credentials file | | `/etc/felis` (secrets, `felis.toml`, `offsite.env`, tunnel config) | kept; `bootstrap.done` and the per-run records go | deleted, with the tunnel's credentials file |
| `/var/lib/felis` (database bundles) | kept | deleted | | `/var/lib/felis` (database bundles) | kept | deleted |
| Worlds, archives, registry, uploads | moved to `/var/lib/felis/retained/k3s-storage-<stamp>/` (with `--keep-k3s`: their volumes switch to `Retain` and stay in place) | deleted | | Worlds, archives, registry, uploads | moved to `/var/lib/felis/retained/k3s-storage-<stamp>/` (with `--keep-k3s`: their volumes switch to `Retain` and stay in place) | deleted |