Skip to content

fix(hw): read live DUT IP for sd-autoboot boards + surface URI-resolve errors#109

Merged
tfcollins merged 3 commits into
mainfrom
fix/resolve-uri-default-iface
Jul 2, 2026
Merged

fix(hw): read live DUT IP for sd-autoboot boards + surface URI-resolve errors#109
tfcollins merged 3 commits into
mainfrom
fix/resolve-uri-default-iface

Conversation

@tfcollins

Copy link
Copy Markdown
Owner

What

Two related improvements to how a booted board's libIIO URI is resolved, found while diagnosing the daily infra job's nemo failure.

  • request/uri.py: resolve_uri now reads the DUT's global-scope IPv4 (not a hardcoded eth0, which newer kernels rename to end0/enp*s0) and logs the previously-swallowed shell error on fallback. The silent except Exception: pass had hidden every failure reason.
  • BootFPGASoCTFTP: after boot, poll the live DUT IP over the strategy's own working shell and write it onto NetworkService.address, so the URI resolver targets the board's real DHCP address instead of a stale static one. sd-autoboot boards DHCP a fresh (random-MAC) IP each boot, and the request-side resolver can't reliably re-acquire a shell on them. Best-effort and fully guarded (never fails the boot; leaves the static address untouched if no IP appears) — so boards whose static address is already correct (bq/mini2) are unaffected.

Honest scope

These do not fix the nemo/adrv9009 daily failure. Validated on the nemo board across three boots: it boots Linux via SD-autoboot but never obtains a DHCP IP within 90 s (the shell works; ip -o addr show scope global returns nothing). That's a genuine board/SD-image networking problem — no CI code can fix a board that isn't getting on the network. The daily job is correctly reporting it. This PR just makes such cases diagnosable (clear "no live IP" instead of a misleading "iiod not reachable at 10.0.0.23") and correctly handles sd-autoboot boards that do get a lease.

Tests

test_request_uri.py / test_request_core.py green; lint clean. The strategy helper is guarded/best-effort and was exercised live on the nemo board (polled, handled the no-IP case gracefully without failing the boot).

https://claude.ai/code/session_01BuMAqiic68LrMr6wWC7NCe

tfcollins added 3 commits July 2, 2026 14:32
sd-autoboot boards (and newer kernels) name the DUT NIC end0/enp*s0, so
`ip -o addr show eth0` returned nothing and resolve_uri wrongly fell back to
the stale static NetworkService.address (a shared placeholder), pointing the
iiod check at the wrong IP. Read the first global-scope IPv4 instead, and log
the previously-swallowed shell error on fallback so misses are diagnosable.

Claude-Session: https://claude.ai/code/session_01BuMAqiic68LrMr6wWC7NCe
sd-autoboot boards DHCP a fresh random-MAC IP each boot, so the exporter's
static NetworkService.address is stale; the request-side URI resolver can't
re-acquire a shell on these targets (no ShellDriver found) and falls back to
that wrong address, sending the iiod check to the wrong host. After boot, read
the live global-scope IPv4 over the strategy's own already-active shell and
write it onto NetworkService.address. Best-effort + guarded, so boards whose
static address is already correct (bq/mini2) are unaffected.

Claude-Session: https://claude.ai/code/session_01BuMAqiic68LrMr6wWC7NCe
@tfcollins tfcollins merged commit 8992d79 into main Jul 2, 2026
6 checks passed
@tfcollins tfcollins deleted the fix/resolve-uri-default-iface branch July 2, 2026 19:29
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