Skip to content

Commit dd7e95c

Browse files
committed
fix(bootstrap): backup stale pool_agent_meta.json before starting services
The pool agent meta file may contain the old driver_spec schema ("driver" key instead of "kind") after upgrading code without re-running the agent. Move the file aside idempotently so the agent recreates it from the database with the correct schema. Signed-off-by: Anton Kremenetsky <anton.kremenetsky@gmail.com>
1 parent 33efa66 commit dd7e95c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

exordos/images/bootstrap.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ source "$VENV_PATH/bin/activate"
143143
# from persistent configuration file.
144144
ra-apply-migration --config-dir "$GC_CFG_DIR/" --path "$GC_PATH/migrations"
145145

146+
# --- Meta file migrations ---
147+
# Backup the pool agent meta file so it gets recreated with the new
148+
# schema (kind instead of driver). Idempotent: only move if the backup
149+
# doesn't already exist.
150+
POOL_META="/var/lib/exordos/exordos_core/pool_agent_meta.json"
151+
POOL_META_BAK="${POOL_META}.20260720"
152+
if [[ -f "${POOL_META}" && ! -f "${POOL_META_BAK}" ]]; then
153+
log "Backing up ${POOL_META} to ${POOL_META_BAK}"
154+
mv "${POOL_META}" "${POOL_META_BAK}"
155+
fi
156+
146157
# Enable exordos core services
147158
log "systemctl enable --now ec-services"
148159
sudo systemctl enable --now \

0 commit comments

Comments
 (0)