Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pve/vm-core.func
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,11 @@ cleanup() {
if declare -f post_update_to_api >/dev/null 2>&1; then
if [[ $exit_code -ne 0 ]]; then
post_update_to_api "failed" "$exit_code"
elif [[ -n "${VMID:-}" ]] && qm config "$VMID" &>/dev/null; then
# Clean exit with the VM in place: a script that never said so itself.
post_update_to_api "done" "none"
else
# Exited cleanly but description()/success was never called: the user
# backed out of a dialog. Report as aborted - NOT "failed 1" (which
# produced meaningless 'General error' records with no error text).
# Clean exit, no VM: the user backed out of a dialog.
post_update_to_api "aborted" "0"
fi
fi
Expand Down
Loading