feat(system_baseline): optionally skip the upgrade while a vzdump backup is running #410
Open
Dragonish
wants to merge 1 commits from
feat/400-skip-upgrade-during-vzdump into main
pull from: feat/400-skip-upgrade-during-vzdump
merge into: Mortis:main
Mortis:main
Mortis:fix/364-ansible-facts
Mortis:ci/168-offline-fast-path
No Reviewers
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Needs Triage
Maintainer needs to evaluate this issue
Status
Ready for Agent
Fully specified, ready for an AFK agent
Status
Ready for Human
Requires human implementation
Wayfinder
Grilling
Decision ticket resolved in conversation with the maintainer
Wayfinder
Map
Wayfinder map: index of a planning effort and its decision tickets
Wayfinder
Prototype
Decision ticket resolved by reacting to a rough concrete artifact
Wayfinder
Research
Decision ticket resolved by reading outside sources
Wayfinder
Task
Manual work that must happen before a decision can be made
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mortis/Kamino#410
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Closes #400
An apt upgrade of a Proxmox node can restart Proxmox services while a backup holds a snapshot of a guest, and the role had no way to say "not now".
This adds
system_baseline_skip_upgrade_during_vzdump(bool, defaultfalse). Withtrueandsystem_baseline_system_type: pve,tasks/update.ymlrunspvesh get /nodes/localhost/tasks --source active --limit 0before the upgrade. Avzdumptask without anendtimeskips the upgrade, and a message says why. Autoremove, autoclean and the reboot check still run, and the role does not wait for the backup.check_mode: falseandchanged_when: false. In the main flow's check mode it is skipped together with the upgrade; theupdateentry point (which previews the upgrade) asks.__system_baseline_vzdump_runningis set on every run, so a guard that is off never inherits an earlier answer.pveshcommand runs. The role adds oneset_factand one skippeddebugto the task list.updateentry point mentions it too), README (table, a section "Skipping the upgrade during a backup", the Tests list) and aminor_changesfragment.Decisions beyond the issue, which you may want to look at:
--source active.pveshlists only finished tasks by default (sourcedefaults toarchive), so without it a running backup is not in the answer. I read the default withpvesh usageon a Proxmox node.localhostas the node. It is the node's own alias in the Proxmox API, so no node name and no gathered facts are needed (theupdateentry point may run without them). I ran the call on a node; if you prefer the real node name, it is one string.updateentry point gets the guard too, as proposed in the issue. It is off unless a caller sets the input.Verified
Assisted-by).ubuntu_lxc) pass on a Debian host with ansible-core 2.22.0, against this branch, with apveshstub. Breaking theendtimetest makes them fail.pvesh usage /nodes/{node}/tasksshows--source(defaultarchive) and--limit(0 to N);pvesh get /nodes/localhost/tasks --source active --limit 0 --output-format jsonanswers[]with no backup running, and--source alllists finishedvzdumptasks with anendtime.--source, a test that would have failed thecheckandidempotencesteps (moved toverify.yml), a misplaced spec bullet and a line over 160 characters; all are fixed in this commit.Not verified
--source activelist a runningvzdumptask without anendtime(nothing was running); the guard relies on that.verify.ymlplay is the first run of the cases there.pveshcall, not the task result.NOTICEandREUSE.toml, or there is none. (None.)Assisted-by: Claude Code:claude-sonnet-5-5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.