fix: drop removed modules from backup schedules - #1265
Open
DavidePrincipi wants to merge 2 commits into
Open
Conversation
Removed app instances kept lingering in a backup schedule's "instances" list and in per-node backup_status entries, so list-backups (and the UI) went on reporting them as backed up. Purge the module id from cluster/backup/* and backup_status when a module or a whole node is removed, and skip any still-stale reference in list-backups by checking cluster/module_uuid. No cluster/event/backup-schedule-changed is published for this cleanup: the frontend never subscribes to that event, and the node-side subscribers (backup timer restart, stale Prometheus file purge) only react to a schedule's existence/enabled state, not to its instances list, which run-backup already reads fresh from Redis on every run. Assisted-by: Claude Code:claude-sonnet-5
Modules removed from the cluster before backup schedule cleanup was implemented (see previous commit) were left dangling in backup instances, backup status entries and cluster/module_uuid — the remove-module/remove-node fix only prevents new occurrences. Add a one-time-per-install, idempotent migration that prunes those stale references using cluster/module_node as the authoritative source of live module ids, and restores the cluster/module_uuid invariant that list-backups now relies on. Assisted-by: Claude Code:claude-sonnet-5
Member
Author
|
Tests are VERIFIED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
instanceslist and in per-nodebackup_statusentries, solist-backups(and the UI) kept reporting them as backed up after the instance was uninstalled.cluster/backup/*andbackup_statuswhen a module or a whole node is removed, and skip any still-stale reference inlist-backupsby checkingcluster/module_uuid.cluster/module_nodeas the authoritative source of live module ids, and restores thecluster/module_uuidinvariant thatlist-backupsnow relies on.NethServer/dev#8094
Test plan
list-backups/ the Backup UI no longer shows the removed instance