sysupgrade: bound the online time sync and show download progress - #2225
Merged
Conversation
Two small robustness/UX fixes for the upgrade flow, both surfaced by the WebUI's /ws/upgrade streaming (OpenIPC/majestic-webui#120): - sync_time: `ntpd -Nnq` can block for minutes when no NTP server is reachable, stranding the upgrade at "Synchronizing time". Bound it with `timeout 30` (guarded by `command -v`, like mount_rootfs). Everything after this fetches via `curl -k`, so an unsynced clock is not fatal. - download_firmware: the tgz download was fully silent (`-s ... -s`), so the "Download" step looked frozen for up to 2 min. Show curl's transfer bar (`-#`) instead; `-s` (silent_update) still opts back out for a quiet console run. Over /ws/upgrade this also keeps the stream lively. Bumps scr_version to 1.0.55. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Two small robustness/UX fixes to the
/ws/upgradefirmware-update flow, surfaced by OpenIPC/majestic-webui#120 ("progress gets stuck" — reported on t31x / ssc37x / ssc33x).Changes (
general/overlay/usr/sbin/sysupgrade)1. Bound the online time sync.
sync_time()ranntpd -Nnq, which can block for minutes when no NTP server is reachable — stranding the upgrade at "Synchronizing time" (the ssc378de report). It's now wrapped intimeout 30(guarded bycommand -v timeout, mirroringmount_rootfs). Everything after this fetches overcurl -k, so an unsynced clock is not fatal — better to move on than hang.2. Show download progress. The tgz download used
curl -s … -s(fully silent), so the "Download" step looked frozen for up to 2 min (the ssc337de report). It now shows curl's transfer bar (-#);-s(silent_update) still opts back out for a quiet console run. Over/ws/upgradethis also keeps the streamed log lively.Bumps
scr_version1.0.54 → 1.0.55.Context
The companion fixes for the same issue are already merged:
pollBacknow waits for a real down-then-up reboot instead of treating any socket close as success./ws/upgradeso the socket survives these silent phases (validated on hi3516ev300 hardware).This PR is the third piece — making
sysupgradeitself emit progress and not hang on time sync.Testing
sh -nclean; matches the existingcommand -v timeoutguard style.ntpdand a curl progress flag, both low-risk. A maintainer flash on any SoC would confirm the streamed progress + no time-sync hang.🤖 Generated with Claude Code