Document today's restructures, and give data/ a README that ships with it
This commit is contained in:
@@ -80,7 +80,7 @@ and the continuous scripts (start_webhook_listener, fallback), which are the fir
|
||||
steps that actually touch containers.
|
||||
|
||||
Why conf_cache_save is FIRST in ARRAY_STOP_SCRIPTS: the RAM cache at
|
||||
`/tmp/.cache/vv/d/` is wiped on reboot. Saving it must happen before anything
|
||||
`/tmp/varaverk/conf/` is wiped on reboot. Saving it must happen before anything
|
||||
else shuts down or changes state.
|
||||
|
||||
---
|
||||
@@ -100,10 +100,10 @@ conf_sync.sh --log Verbose output
|
||||
### What It Syncs
|
||||
|
||||
- **Pull**: reads the partner's `Configurations/${partner_id}.conf` from their disk
|
||||
via SCP → writes to local `/tmp/.cache/vv/d/${partner_id}.conf`
|
||||
via SCP → writes to local `/tmp/varaverk/conf/${partner_id}.conf`
|
||||
- **Push**: sends own `Configurations/${my_id}.conf` to partner's
|
||||
`/tmp/.cache/vv/d/${my_id}.conf` via SCP
|
||||
- **Own conf in local cache**: copies own conf to `/tmp/.cache/vv/d/${my_id}.conf`
|
||||
`/tmp/varaverk/conf/${my_id}.conf` via SCP
|
||||
- **Own conf in local cache**: copies own conf to `/tmp/varaverk/conf/${my_id}.conf`
|
||||
on full sync (so the cache has a complete snapshot of all confs)
|
||||
|
||||
Only partner confs are sourced from cache — `load_config.sh` always reads own conf
|
||||
@@ -136,7 +136,7 @@ A notification fires if any partner fails — check partner reachability via Tai
|
||||
|
||||
### What It Does
|
||||
|
||||
At array stop, copies all partner confs from `/tmp/.cache/vv/d/` to
|
||||
At array stop, copies all partner confs from `/tmp/varaverk/conf/` to
|
||||
`$PERSISTENT_CONF_CACHE`. Own conf is skipped (always on disk). The backup survives
|
||||
the reboot and is used by `conf_cache_restore.sh` at next array start if the sync
|
||||
can't reach the partner.
|
||||
@@ -164,7 +164,7 @@ conf_cache_save.sh --log # verbose output
|
||||
### What It Does
|
||||
|
||||
At array start (after `conf_sync.sh`), checks which partner confs are missing from
|
||||
`/tmp/.cache/vv/d/`. For each missing conf, loads it from `$PERSISTENT_CONF_CACHE`
|
||||
`/tmp/varaverk/conf/`. For each missing conf, loads it from `$PERSISTENT_CONF_CACHE`
|
||||
if a backup exists there.
|
||||
|
||||
Always removes the persistent backup when done — whether used or not. On a normal
|
||||
@@ -434,8 +434,8 @@ REBOOT_VM_WAIT=30
|
||||
# STATE_DIR and PERSISTENT_CONF_CACHE are derived from SCRIPTS_DIR in master.conf.
|
||||
# They adapt to internal (/boot/config/plugins/varaverk) or appdata storage mode
|
||||
# (/mnt/user/appdata/Varaverk) automatically — do not hardcode paths.
|
||||
STATE_DIR="${SCRIPTS_DIR}/State_Files"
|
||||
PERSISTENT_CONF_CACHE="${SCRIPTS_DIR}/.cache/vv/d"
|
||||
STATE_DIR="${DATA_DIR}/state"
|
||||
PERSISTENT_CONF_CACHE="${CACHE_BACKUP_DIR}/conf"
|
||||
```
|
||||
|
||||
---
|
||||
@@ -446,7 +446,7 @@ PERSISTENT_CONF_CACHE="${SCRIPTS_DIR}/.cache/vv/d"
|
||||
|
||||
```bash
|
||||
# Check what's in the RAM cache:
|
||||
ls -la /tmp/.cache/vv/d/
|
||||
ls -la /tmp/varaverk/conf/
|
||||
|
||||
# Check what's in the persistent backup:
|
||||
ls -la "$PERSISTENT_CONF_CACHE/" # set SCRIPTS_DIR first or use full path
|
||||
|
||||
@@ -35,7 +35,7 @@ any container-connecting or continuous scripts start.
|
||||
**Partner Conf Lost Across Reboots When Partner is Down**
|
||||
Scripts like `fallback.sh` need the partner's conf vars (credentials, container
|
||||
names, tier delays) to operate. The partner conf lives in a RAM cache at
|
||||
`/tmp/.cache/vv/d/` — wiped every reboot. At array start, `conf_sync.sh` pulls
|
||||
`/tmp/varaverk/conf/` — wiped every reboot. At array start, `conf_sync.sh` pulls
|
||||
a fresh copy from the partner. But if the partner is offline at boot time, the
|
||||
pull fails and fallback has no partner vars to work with.
|
||||
|
||||
@@ -120,16 +120,16 @@ Plugin/unraid/Watchdogs/System/
|
||||
```
|
||||
Array starts (array_started.sh, ARRAY_START_SCRIPTS):
|
||||
│
|
||||
├─ conf_sync.sh ← SSH/SCP: pull partner confs into /tmp/.cache/vv/d/
|
||||
│ push own conf to partner's /tmp/.cache/vv/d/
|
||||
├─ conf_sync.sh ← SSH/SCP: pull partner confs into /tmp/varaverk/conf/
|
||||
│ push own conf to partner's /tmp/varaverk/conf/
|
||||
├─ conf_cache_restore.sh ← if partner was down: load last-known-good conf from
|
||||
│ $PERSISTENT_CONF_CACHE into /tmp/.cache/vv/d/
|
||||
│ $PERSISTENT_CONF_CACHE into /tmp/varaverk/conf/
|
||||
├─ docker_syslog_filter.sh ← before any container starts (veth filter must be live)
|
||||
└─ inotify_tuning.sh ← before docker_network_connect.sh and continuous scripts
|
||||
|
||||
Array stops (array_stopping.sh, ARRAY_STOP_SCRIPTS):
|
||||
│
|
||||
├─ conf_cache_save.sh ← FIRST: snapshot /tmp/.cache/vv/d/ → $PERSISTENT_CONF_CACHE
|
||||
├─ conf_cache_save.sh ← FIRST: snapshot /tmp/varaverk/conf/ → $PERSISTENT_CONF_CACHE
|
||||
│ while RAM cache is still fresh
|
||||
├─ rsync_stop.sh --rsync-only ← kill active rsync, skip container recovery
|
||||
└─ ...other stop scripts...
|
||||
|
||||
Reference in New Issue
Block a user