Fix VIRTNBD_FALSE_SUCCESS false-positive on Windows VMs with BitLocker#2
Open
hostarts wants to merge 1 commit into
Open
Fix VIRTNBD_FALSE_SUCCESS false-positive on Windows VMs with BitLocker#2hostarts wants to merge 1 commit into
hostarts wants to merge 1 commit into
Conversation
The post-backup ERROR-line scan in perform_backup() used a case- insensitive substring match (grep -qi "ERROR"), which fired on the word "ERROR" appearing inside INFO/WARN payloads. On Windows VMs the QEMU guest agent surfaces BitLocker status text that contains the word during normal operation, marking otherwise-successful backups as failed and triggering retries and spurious alert noise. The check is now anchored to the timestamped severity prefix (^[YYYY-MM-DD HH:MM:SS] ERROR ) so only real ERROR-level records trigger the guard. ANSI colour escapes from virtnbdbackup are stripped before the anchor match so coloured output still matches. Same fix applied to the diagnostic snippet extraction.
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
perform_backup()'s post-backup ERROR-line scan used a case-insensitive substring match (grep -qi "ERROR"), which fires on any occurrence of the word "ERROR" in the captured virtnbdbackup log — including INFO/WARN payloads. On Windows VMs the QEMU guest agent surfaces BitLocker status text that legitimately contains the word "ERROR" during normal operation, so otherwise-successful backups are flagged asVIRTNBD_FALSE_SUCCESS, retried, and generate spurious alert noise.The check is now anchored to the timestamped severity prefix:
so only real
ERROR-level log records trigger the guard. ANSI colour escapes emitted by virtnbdbackup are stripped before the anchor match so coloured output still matches. The same fix is applied to the diagnostic-snippet extraction that follows.What changed
vmbackup.sh(perform_backup, ~line 3590): switched the false-success guard and the snippet extractor tosed -E 's/\x1b\[[0-9;]*m//g' | grep -qE '^\[[0-9-]{10} [0-9:]{8}\] ERROR '.CHANGELOG.md: added[Unreleased]entry under### Fixed.Test plan
ERRORinside a BitLocker status line; old grep matched, new grep does not.[2026-05-01 12:34:56] ERROR ...lines emitted by virtnbdbackup.bash -n vmbackup.shpasses.🤖 Generated with Claude Code