fix: migration error handling + updates retry mechanism

migration.uc:
- try/catch around migration.run() with error logging
- try/catch around apply_operations() with error logging
- Error checking for UCI cursor operations in apply_operations
- Checked fs.writefile return values in ensure_runtime_cache_format

updates.uc:
- Write pending marker on lock acquisition failure for next retry
This commit is contained in:
Dushnilin
2026-08-03 20:01:09 +03:00
parent 5f5031e4db
commit 4e12681179
2 changed files with 37 additions and 20 deletions
+2 -1
View File
@@ -2667,7 +2667,8 @@ function list_update() {
// с reload-firewall, который пересоздаёт таблицы и сеты nftables)
log_message("Waiting for reload lock to apply nft rules", "debug");
if (!acquire_runtime_lock(RELOAD_LOCK_DIR, true)) {
log_message("Could not acquire reload lock for nft apply; skipping nft update", "warn");
log_message("Could not acquire reload lock for nft apply; saving pending marker for next attempt", "warn");
try { fs.writefile("/tmp/tachyon_list_update_pending_nft", as_string(now_seconds())); } catch(e) {}
list_update_pid_end();
exit(1);
}