Skip to content

fix(linbo_upload): report failed uploads as failed - #198

Merged
HappyBasher merged 1 commit into
7.4from
fix/linbo-upload-rc
Oct 24, 2026
Merged

HappyBasher merged 1 commit into
7.4from
fix/linbo-upload-rc

Conversation

@HappyBasher

Copy link
Copy Markdown
Member

Summary

linbo_upload reported every failed upload as successful (exit status 0):

  • the exit status of rsync was ignored,
  • the log check grep -q " rsync --skip-compress="$RSYNC_SKIP_COMPRESS" error" never matches. A search and replace turned the original " rsync error" into this (already in the 7.4 source import Refactor build process to use 100% Ubuntu components #151; 4.3 is affected the same way).

With the new pre-upload checks of 7.4.21 (#133) this matters: an upload refused by the server (rsync code 4) was shown as "Successfully uploaded".

Fix: evaluate the exit status of rsync (|| RC=1) and grep the log for rsync error again. Header converted.

Backport to 4.3 to follow.

Test plan

  • busybox ash -n
  • Live on client multi-1 (lmnsrv1, 7.4.21 test package), original restored afterwards:
    • wrong password: Failed to upload zzfail.qcow2 (before: Successfully uploaded, reproduced)
    • foreign ubuntu.qcow2, refused by the pre-upload hook: Failed to upload ubuntu.qcow2, server image untouched
    • new image zzok.qcow2: Successfully uploaded (removed from the server afterwards)

🤖 Generated with Claude Code

linbo_upload ignored the exit status of rsync and grepped the rsync log
for " rsync --skip-compress=... error", a pattern a search and replace
had made of " rsync error" and that never matches. Every failed upload,
e.g. with a wrong password or refused by the server's pre-upload checks
(rsync code 4), was therefore reported as "Successfully uploaded" with
exit status 0.

The exit status of rsync is now evaluated, and the log is searched for
"rsync error" again.

Signed-off-by: [email protected]
Assisted-by: Claude
@HappyBasher
HappyBasher merged commit 050d441 into 7.4 Oct 24, 2026
6 checks passed
@HappyBasher
HappyBasher deleted the fix/linbo-upload-rc branch October 24, 2026 15:34
HappyBasher added a commit that referenced this pull request Oct 24, 2026
linbo_upload ignored the exit status of rsync and grepped the rsync log
for " rsync --skip-compress=... error", a pattern a search and replace
had made of " rsync error" and that never matches. Every failed upload,
e.g. with a wrong password or refused by the server's pre-upload checks
(rsync code 4), was therefore reported as "Successfully uploaded" with
exit status 0.

The exit status of rsync is now evaluated, and the log is searched for
"rsync error" again.

Backport of d8d57ff (#198) from 7.4.

Signed-off-by: [email protected]
Assisted-by: Claude
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.

1 participant