fix(deploy): make the view's upper base before installing the view
`ensure_media_view` ran `install` on a host where the documented base directory
did not exist, and `install` refuses by design ("put it on the SSD first") — so
tonight's cutover would have died at the restart step with nobody beside the
box. `media-view.sh ensure-base` now makes the documented directory, and the
deployer calls it first; two seams cover it (the subcommand's behaviour, and the
ordering invariant inside `ensure_media_view`).
Docs flip with the deploy: the view is live on Dankserver (both media servers
verified resolving real media through it), so every "never been deployed" claim
in the view, Plex, Jellyfin and AGENTS pages is corrected, and three laws join
them — a container restart discards the in-flight library scan and nothing
resumes it; Jellyfin 12.4 authenticates only the `MediaBrowser Token` form, so a
401 says nothing about the key until the `ApiKeys` table is read; and Plex
answers 32400 over TLS only, which makes a plaintext health probe read as dead.
This commit is contained in:
1 parent
0336f42e2a
commit
6d79709cc0
6 files changed
+77
-26
No files matched your search
+18
-1
@@ -60,7 +60,7 @@ die() {
|
||||
}
|
||||
|
||||
usage() {
|
||||
printf 'usage: %s plan|verify|install|reap|status [options]\n' "$0" >&2
|
||||
printf 'usage: %s plan|ensure-base|verify|install|reap|status [options]\n' "$0" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
@@ -98,6 +98,22 @@ require_upper_base() {
|
||||
|| die "refused: upper base $upper_base does not exist (put it on the SSD first)"
|
||||
}
|
||||
|
||||
# The SSD placement of the metadata layer is a human choice, so `install` refuses
|
||||
# to invent a base directory: a mistyped --upper-base must not quietly create a
|
||||
# tree on whatever filesystem the caller landed on. The deployer owns the
|
||||
# documented location, so it calls this first — measured 2026-10-31, when a
|
||||
# fresh-host `install` died with "put it on the SSD first" and nothing in git
|
||||
# would have created it.
|
||||
do_ensure_base() {
|
||||
if [ -d "$upper_base" ]; then
|
||||
printf 'base: %s exists\n' "$upper_base"
|
||||
return 0
|
||||
fi
|
||||
install -d -m 0755 "$upper_base" 2>/dev/null \
|
||||
|| die "refused: cannot create $upper_base — it lives outside the checkout, run this as root"
|
||||
printf 'base: created %s\n' "$upper_base"
|
||||
}
|
||||
|
||||
do_plan() {
|
||||
printf 'lowerdir=%s\nupperdir=%s\nworkdir=%s\nmountpoint=%s\nunit=%s/%s\n' \
|
||||
"$lower" "$upper" "$work" "$VIEW" "$UNIT_DIR" "$UNIT"
|
||||
@@ -234,6 +250,7 @@ do_status() {
|
||||
case "$cmd" in
|
||||
plan) do_plan ;;
|
||||
verify) do_verify ;;
|
||||
ensure-base) do_ensure_base ;;
|
||||
install) do_install ;;
|
||||
reap) do_reap ;;
|
||||
status) do_status ;;
|
||||
|
||||
Reference in new issue
Block a user