Skip to content

fix(backup): harden backup failure handling#533

Merged
derekbit merged 1 commit into
longhorn:masterfrom
derekbit:issue-12842
May 18, 2026
Merged

fix(backup): harden backup failure handling#533
derekbit merged 1 commit into
longhorn:masterfrom
derekbit:issue-12842

Conversation

@derekbit
Copy link
Copy Markdown
Member

Which issue(s) this PR fixes:

Issue longhorn/longhorn#12842

What this PR does / why we need it:

Check replica state before reading snapshot data so backups fail through the normal error path when the replica is no longer running.

Also make UpdateBackupStatus preserve error as the final state even when progress reaches 100, and add tests to cover both error-first and error-after-completion cases.

Special notes for your reviewer:

Additional documentation or context

@derekbit derekbit self-assigned this May 18, 2026
@derekbit
Copy link
Copy Markdown
Member Author

@mergify backport v1.12.x

@mergify
Copy link
Copy Markdown

mergify Bot commented May 18, 2026

backport v1.12.x

✅ Backports have been created

Details

davidcheng0922
davidcheng0922 previously approved these changes May 18, 2026
Copy link
Copy Markdown
Contributor

@davidcheng0922 davidcheng0922 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Check replica state before reading snapshot data so backups fail
through the normal error path when the replica is no longer running.

Also make UpdateBackupStatus preserve error as the final state even
when progress reaches 100, and add tests to cover both error-first
and error-after-completion cases.

Longhorn 12842

Signed-off-by: Derek Su <derek.su@suse.com>
@davidcheng0922 davidcheng0922 self-requested a review May 18, 2026 07:40
Copy link
Copy Markdown
Contributor

@mantissahz mantissahz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
And derekbit/longhorn-instance-manager:issue-12842-03 works as expected.

@derekbit derekbit merged commit cf4a307 into longhorn:master May 18, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants