odysseus/scripts
RaresKeY f7cbc885c1
fix(docker): migrate retained SearXNG settings (#6055)
* fix(docker): migrate retained SearXNG settings

Retained nonempty SearXNG settings can miss defaults required by newer pinned images while bypassing the entrypoint's narrow regeneration checks.

Add an atomic PyYAML-aware migration to all Compose variants. Preserve existing inheritance choices, custom content, secrets, ownership, and mode while inserting only the missing top-level default-inheritance key.

Validated with 39 focused and adjacent tests, compile checks, and fresh and retained pinned-image HTTP 200 gates. Full repository CI remains for the PR.

* fix(docker): chmod the settings temp file before chowning it

The Compose cap set is `cap_drop: ALL` plus CHOWN/SETGID/SETUID/DAC_OVERRIDE
and carries no FOWNER, and searxng's own entrypoint chowns /etc/searxng to
searxng:searxng, so every retained settings file belongs to that user by the
second boot. Chowning the temporary file first left root unable to chmod it,
so the migration exited 1 and `set -eu` killed the container before
`exec /usr/local/searxng/entrypoint.sh` — SearXNG never started and odysseus
blocked on its healthcheck.

Swap the two calls so the chmod lands while the temporary file is still
root-owned, and cover the ordering with a test that refuses the chmod once
the chown has happened, the way the kernel does.

* fix(docker): let searxng boot when the settings migration fails

The migration runs under `set -eu`, so any settings file it cannot parse or
rewrite took the container down instead of merely going unmigrated. A symlinked
/etc/searxng/settings.yml is enough: the migration refuses a non-regular file
and searxng, which reads through the symlink perfectly well, never got to start.

Guard the call with `|| true` in all three Compose variants. The failure still
prints its reason on stderr, and searxng is left to report anything genuinely
wrong with the file.

---------

Co-authored-by: Léo <leograndcontact@gmail.com>
2026-08-16 04:17:58 +02:00
..
_completion Odysseus v1.0 2026-05-31 23:58:26 +09:00
_lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
demo_email fix(email): serialize default-account mutations (#5805) 2026-08-12 04:59:46 +01:00
add_hwfit_models.py Hwfit: estimate params from config.json fallback 2026-06-02 20:33:25 +09:00
agent_migration_manifest.py docs: add agent migration manifest helper (#3028) 2026-06-15 15:57:33 +09:00
backfill_model_release_dates.py Open email context for agent, email search across All Mail, cookbook serve polish 2026-06-15 20:47:51 +09:00
check-docker-amd-gpu.sh Parse all AMD GPU check args (#1586) 2026-06-03 08:56:48 +09:00
check-docker-gpu.sh docs(docker): polish WSL2 snap GPU guidance 2026-07-08 19:30:41 +00:00
claim_ownerless.py Reject blank ownerless claim owner (#4929) 2026-06-28 10:57:11 +01:00
diffusion_server.py Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
encode_previews.sh Odysseus v1.0 2026-05-31 23:58:26 +09:00
fix_paths.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
hf_download.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
import_from_vllm_recipes.py Open email context for agent, email search across All Mail, cookbook serve polish 2026-06-15 20:47:51 +09:00
index_documents.py refactor(constants): single source of truth for data dir (#3368) 2026-06-08 09:58:52 +02:00
migrate_faiss_to_chroma.py refactor(constants): single source of truth for data dir (#3368) 2026-06-08 09:58:52 +02:00
migrate_searxng_settings.py fix(docker): migrate retained SearXNG settings (#6055) 2026-08-16 04:17:58 +02:00
mlx_image_server.py Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
odysseus Require runnable dispatcher subcommands (#1585) 2026-06-03 08:56:56 +09:00
odysseus-backup Skip vanished backup list entries (#2006) 2026-07-11 05:26:42 +01:00
odysseus-calendar Fix odysseus-calendar list dropping in-progress / multi-day events (#2065) 2026-06-16 14:04:56 +02:00
odysseus-contacts Skip invalid contacts CLI rows (#1569) 2026-06-03 14:11:21 +09:00
odysseus-cookbook fix(platform): Improve WSL SSH remote compatibility (#3316) 2026-06-08 00:33:50 +02:00
odysseus-docs Ignore non-string docs CLI content lengths (#1561) 2026-06-03 14:06:46 +09:00
odysseus-gallery Normalize gallery CLI text fields (#2012) 2026-06-29 13:47:29 +01:00
odysseus-logs fix: logs CLI _resolve crashes on a non-string name (#1631) 2026-06-03 08:59:30 +09:00
odysseus-mail Ignore non-string mail CLI recipients (#1824) 2026-06-29 13:41:22 +01:00
odysseus-mcp Normalize stored MCP CLI JSON (#1554) 2026-06-03 14:11:35 +09:00
odysseus-memory fix: odysseus-memory cmd_add crashes on non-dict existing memory row (#2091) 2026-07-11 03:05:17 +01:00
odysseus-notes Skip invalid notes CLI item rows (#2005) 2026-06-29 14:26:46 +01:00
odysseus-personal Skip invalid personal CLI index rows (#1571) 2026-06-03 14:06:42 +09:00
odysseus-preset Let preset set replace corrupt entries (#1650) 2026-06-03 14:10:58 +09:00
odysseus-research Research CLI: alias --status complete to the stored done value (#2515) 2026-06-05 08:50:33 +01:00
odysseus-sessions Normalize session CLI counters (#1578) 2026-06-03 08:57:41 +09:00
odysseus-signature Reject non-PNG signature export data (#1651) 2026-06-03 14:10:54 +09:00
odysseus-skills Skip invalid skills CLI rows (#1553) 2026-06-03 14:11:38 +09:00
odysseus-tasks Ignore non-string task CLI previews (#1559) 2026-06-03 14:06:49 +09:00
odysseus-theme Reject invalid theme CLI prefs (#1396) 2026-06-03 14:12:35 +09:00
odysseus-webhook Mask short webhook CLI tokens (#1558) 2026-06-03 14:11:28 +09:00
pr_blocker_audit.py tools: add read-only PR blocker audit helper 2026-06-04 12:51:48 +01:00
update_database.py Remove duplicate update database body (#1584) 2026-06-03 08:57:03 +09:00