fix: the apt read ends on its own status echo, 4.59.1 (NetOrk/netork#3139) #150

Merged
christianmanivong merged 1 commits from fix/apt-end-marker-3139 into main 2026-12-05 15:33:44 +00:00
Owner

APT_UPGRADABLE_COMMAND printed __APT_PHASED: (4.58.1) and __APT_E: (4.57.0) after __APT_RC. napalm-linux's expect_for reads until the command's last status echo, followed directly by the prompt. On an Ubuntu host where apt defers a package for phasing, that never happened, and every update read ran into the 60 s timeout. Seen on an Ubuntu 24.04 host (NetOrk/netork#3139).

  • __APT_END= is now echoed after everything else, as the command's last line.
  • The parse ignores it.
  • Tests run the real command in sh with a fake apt/apt-get: once with phased packages, once with an apt error. Both times the last line has to be the marker of the last status echo.
  • Checked against the affected host: the read now finishes in 5 s instead of timing out after 60 s.

Release commit 4.59.1 included; the tag follows the merge.

`APT_UPGRADABLE_COMMAND` printed `__APT_PHASED:` (4.58.1) and `__APT_E:` (4.57.0) **after** `__APT_RC`. napalm-linux's `expect_for` reads until the command's last status echo, followed directly by the prompt. On an Ubuntu host where apt defers a package for phasing, that never happened, and every update read ran into the 60 s timeout. Seen on an Ubuntu 24.04 host (NetOrk/netork#3139). - `__APT_END=` is now echoed after everything else, as the command's last line. - The parse ignores it. - Tests run the real command in `sh` with a fake `apt`/`apt-get`: once with phased packages, once with an apt error. Both times the last line has to be the marker of the last status echo. - Checked against the affected host: the read now finishes in 5 s instead of timing out after 60 s. Release commit 4.59.1 included; the tag follows the merge.
christianmanivong added 1 commit 2026-12-05 13:10:53 +00:00
fix: the apt read ends on its own status echo, 4.59.1 (NetOrk/netork#3139)
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 14s
driver / lowest (pull_request) Successful in 41s
driver / types (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 1m11s
driver / test (3.12) (pull_request) Successful in 1m21s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Successful in 1m59s
driver / publish (pull_request) Skipped
9106871bfa
APT_UPGRADABLE_COMMAND printed __APT_PHASED (4.58.1) and __APT_E (4.57.0)
after __APT_RC. A screen-scraping transport reads until the command's last
status echo and the prompt after it, so on a host where apt defers a package
for phasing, or reports an error, the read never ended and ran into its
timeout. __APT_END is now echoed once everything else is written.
christianmanivong merged commit 70a8195f7e into main 2026-12-05 15:33:44 +00:00
christianmanivong deleted branch fix/apt-end-marker-3139 2026-12-05 15:33:46 +00:00
Sign in to join this conversation.